summaryrefslogtreecommitdiff
path: root/abuild.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-11-01 08:50:20 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-11-01 08:50:20 +0000
commitb0f9ec91f7de9e5cad40e795159f99fec19e52a9 (patch)
treefb63ff787280de9d90ab708029a700da7f71acf8 /abuild.in
parentbfc8e373234cf0f1b4242eabc71e34b4d087d635 (diff)
downloadabuild-b0f9ec91f7de9e5cad40e795159f99fec19e52a9.tar.gz
abuild-b0f9ec91f7de9e5cad40e795159f99fec19e52a9.tar.bz2
abuild-b0f9ec91f7de9e5cad40e795159f99fec19e52a9.tar.xz
abuild-b0f9ec91f7de9e5cad40e795159f99fec19e52a9.zip
abuild: verify names of subpackages
This is to avoid things like: http://git.alpinelinux.org/cgit/aports/commit/?id=81c0a4bb37e709ebc5add8394331d28209a61b6f
Diffstat (limited to 'abuild.in')
-rwxr-xr-xabuild.in7
1 files changed, 7 insertions, 0 deletions
diff --git a/abuild.in b/abuild.in
index e1e9516..0f679c9 100755
--- a/abuild.in
+++ b/abuild.in
@@ -110,6 +110,13 @@ sanitycheck() {
[ -z "$url" ] && die "Missing url in APKBUILD"
[ -z "$license" ] && die "Missing license in APKBULID"
+ # check so no package names starts with -
+ for i in $pkgname $subpackages; do
+ case $i in
+ -*) die "${i%:*} is not a valid package name";;
+ esac
+ done
+
# check if CARCH, CBUILD, CHOST and CTARGET is set
if [ -z "$CARCH" ]; then
case "$(uname -m)" in