summaryrefslogtreecommitdiffstats
path: root/VDEPENDS
diff options
context:
space:
mode:
authorIsmael Luceno2021-02-13 19:31:07 +0100
committerIsmael Luceno2021-02-13 19:31:47 +0100
commite688ec7a7882cd079b308c2034b5ad422da9e530 (patch)
treefc6850fef7baff1cfb325d858f432a7eef3d7c1f /VDEPENDS
parentd84e2c9c7c127194f81fc8a2a34ff6b4d02fda9a (diff)
vdepends: replace is_version_less with a simpler is_version_ge
Diffstat (limited to 'VDEPENDS')
-rw-r--r--VDEPENDS16
1 files changed, 8 insertions, 8 deletions
diff --git a/VDEPENDS b/VDEPENDS
index 4a7710cc18..f1ba8dd0fa 100644
--- a/VDEPENDS
+++ b/VDEPENDS
@@ -10,18 +10,18 @@
# binutils[LIBERTY] >= 2.35 flags: --with-liberty
# EOF
-is_version_less() {
- local v="$1
-$2"
- [ "$(sort -V <<< "$v")" = "$v" ] && [ "$1" != "$2" ]
+is_version_ge() {
+ local v="$2
+$1"
+ [ "$(sort -V <<< "$v")" = "$v" ]
}
vdepends_vercheck() {
case "$2" in
- ('>') is_version_less "$3" "$1" ;;
- ('>=') ! is_version_less "$1" "$3" ;;
- ('<') is_version_less "$1" "$3" ;;
- ('<=') ! is_version_less "$3" "$1" ;;
+ ('>') ! is_version_ge "$3" "$1" ;;
+ ('>=') is_version_ge "$1" "$3" ;;
+ ('<') ! is_version_ge "$1" "$3" ;;
+ ('<=') is_version_ge "$3" "$1" ;;
('=') [ "x$1" = "x$3" ] ;;
('!=') [ "x$1" != "x$3" ] ;;
(*) message vdepends: \