diff options
author | Vlad Glagolev | 2011-06-20 21:11:28 +0400 |
---|---|---|
committer | Vlad Glagolev | 2011-06-20 21:11:28 +0400 |
commit | 181c033d1a6c28cf7ccebf4265ef37d184857152 (patch) | |
tree | 89397d8f5e6575d4bc1b3fa21462af005ff0434d /FUNCTIONS | |
parent | a8b0d07f2ccffb7c6e3eb6752e59d002597663f1 (diff) |
added first draft for function is_version_less() to compare two versions
Diffstat (limited to 'FUNCTIONS')
-rwxr-xr-x | FUNCTIONS | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -703,6 +703,13 @@ function default_build_make(){ } #--- +## Compare if one version is less than another (uses sort from coreutils) +#--- +function is_version_less() { + [ ! $(echo -e "$1\n$2" | sort --version-sort | head -1) = "$2" ] +} + +#--- ## Simple version check with force depends ## @params $1 - the spell to check the version of ## @params $2 - the simple version to check against |