summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xabump.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/abump.in b/abump.in
index cd6163e..cf6b5eb 100755
--- a/abump.in
+++ b/abump.in
@@ -37,6 +37,12 @@ do_bump() {
. "$a" || exit 1
[ "$pkgname" = "$name" ] || die "$name: APKBUILD has different \$pkgname"
type package | grep -q function || die "$name: missing package()"
+ case $(apk version --test "$pkgver" "$ver") in
+ '=') die "$pkgname: already at version $pkgver";;
+ '>') die "$pkgname: already at newer version $pkgver";;
+ '<') exit 0;;
+ *) exit 1;;
+ esac
) || { rc=1; continue; }
(