summaryrefslogtreecommitdiff
path: root/abump.in
diff options
context:
space:
mode:
authorDubiousjim <dubiousjim@gmail.com>2013-07-05 00:21:31 -0400
committerNatanael Copa <ncopa@alpinelinux.org>2013-07-09 07:09:48 +0000
commit8198ded868d4b7b98f8d06a2f0f0d90eaf2ad9da (patch)
tree98a0c5b9a3ea5ba11f6fbe1dd2f0384464615cdc /abump.in
parenta10203d0fc92f3824216a4d7a19b2ccf856a837a (diff)
downloadabuild-8198ded868d4b7b98f8d06a2f0f0d90eaf2ad9da.tar.gz
abuild-8198ded868d4b7b98f8d06a2f0f0d90eaf2ad9da.tar.bz2
abuild-8198ded868d4b7b98f8d06a2f0f0d90eaf2ad9da.tar.xz
abuild-8198ded868d4b7b98f8d06a2f0f0d90eaf2ad9da.zip
abump: verify APKBUILD's version
Diffstat (limited to 'abump.in')
-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; }
(