summaryrefslogtreecommitdiffstats
path: root/abuild.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-06-09 11:27:42 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-06-09 11:27:42 +0000
commita3dca8d66a65196e2bc2e79233ba7a2f2722187a (patch)
treeb210687272eff3a4519dd4e38f4c174fb693d47b /abuild.in
parent482d9bf5af0976705fd7f8a21cf429d1e419f0e8 (diff)
downloadabuild-a3dca8d66a65196e2bc2e79233ba7a2f2722187a.tar.bz2
abuild-a3dca8d66a65196e2bc2e79233ba7a2f2722187a.tar.xz
abuild: use apk version --check to verify the pkgver
Diffstat (limited to 'abuild.in')
-rwxr-xr-xabuild.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/abuild.in b/abuild.in
index 29c49e0..9d43099 100755
--- a/abuild.in
+++ b/abuild.in
@@ -95,8 +95,8 @@ sanitycheck() {
[ -z "$pkgname" ] && die "Missing pkgname in APKBUILD"
[ -z "${pkgname##* *}" ] && die "pkgname contains spaces"
[ -z "$pkgver" ] && die "Missing pkgver in APKBUILD"
- [ "${pkgver##[0-9]}" == "$pkgver" ] && \
- die "pkgver does not start with a digit"
+ apk version --check -q "$pkgver" ||\
+ die "$pkgver is not a valid version"
[ -z "$pkgrel" ] && warning "Missing pkgrel in APKBUILD. Using pkgrel=0"
[ -z "$pkgdesc" ] && die "Missing pkgdesc in APKBUILD"
[ -z "$url" ] && die "Missing url in APKBUILD"