abuild: check for more common spell errors
check for pkguser, pkggroup, subpackage
This commit is contained in:
parent
a5bed6ab0e
commit
076ecdf315
11
abuild.in
11
abuild.in
@ -123,6 +123,10 @@ die() {
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
spell_error() {
|
||||||
|
die "APKBUILD contains '$1'. It should be '$2'"
|
||||||
|
}
|
||||||
|
|
||||||
# check if apkbuild is basicly sane
|
# check if apkbuild is basicly sane
|
||||||
default_sanitycheck() {
|
default_sanitycheck() {
|
||||||
local i= j= suggestion=
|
local i= j= suggestion=
|
||||||
@ -220,8 +224,11 @@ default_sanitycheck() {
|
|||||||
done
|
done
|
||||||
|
|
||||||
# common spelling errors
|
# common spelling errors
|
||||||
[ -n "$depend" ] && die "APKBUILD contains 'depend'. It should be depends"
|
[ -n "$depend" ] && spell_error depend depends
|
||||||
[ -n "$makedepend" ] && die "APKBUILD contains 'makedepend'. It should be makedepends"
|
[ -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"
|
grep '^# Maintainer:' $APKBUILD >/dev/null || warning "No maintainer"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user