summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-07-02 08:16:18 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2013-07-02 08:16:18 +0200
commit076ecdf3156d13094c33d8836246ef189fbc9470 (patch)
tree6f9dcafe87c20b54b2191f7084cead510efecbd7
parenta5bed6ab0eac14b7d4956731aa86f6b05ac9116f (diff)
downloadabuild-076ecdf3156d13094c33d8836246ef189fbc9470.tar.gz
abuild-076ecdf3156d13094c33d8836246ef189fbc9470.tar.bz2
abuild-076ecdf3156d13094c33d8836246ef189fbc9470.tar.xz
abuild-076ecdf3156d13094c33d8836246ef189fbc9470.zip
abuild: check for more common spell errors
check for pkguser, pkggroup, subpackage
-rwxr-xr-xabuild.in13
1 files changed, 10 insertions, 3 deletions
diff --git a/abuild.in b/abuild.in
index e51282d..2b74063 100755
--- a/abuild.in
+++ b/abuild.in
@@ -123,6 +123,10 @@ die() {
exit 1
}
+spell_error() {
+ die "APKBUILD contains '$1'. It should be '$2'"
+}
+
# check if apkbuild is basicly sane
default_sanitycheck() {
local i= j= suggestion=
@@ -181,7 +185,7 @@ default_sanitycheck() {
fi
done
done
-
+
for i in $triggers; do
local f=${i%=*}
local p=${f%.trigger}
@@ -220,8 +224,11 @@ default_sanitycheck() {
done
# common spelling errors
- [ -n "$depend" ] && die "APKBUILD contains 'depend'. It should be depends"
- [ -n "$makedepend" ] && die "APKBUILD contains 'makedepend'. It should be makedepends"
+ [ -n "$depend" ] && spell_error depend depends
+ [ -n "$makedepend" ] && spell_error makedepend makedepends
+ [ -n "$pkguser" ] && spell_error pkguser pkgusers
+ [ -n "$pkggroup" ] && spell_error pkggroup pkggroups
+ [ -n "$subpackage" ] && spell_error subpackage subpackages
grep '^# Maintainer:' $APKBUILD >/dev/null || warning "No maintainer"