summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/makepkg.sh.in13
1 files changed, 11 insertions, 2 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 47b1fd10..7161096e 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1140,8 +1140,17 @@ check_sanity() {
error "$(gettext "%s is not allowed to be empty.")" "pkgrel"
return 1
fi
- if [[ ${pkgname:0:1} == "-" ]]; then
- error "$(gettext "%s is not allowed to start with a hyphen.")" "pkgname"
+
+ local name
+ for name in "${pkgname[@]}"; do
+ if [[ ${name:0:1} = "-" ]]; then
+ error "$(gettext "%s is not allowed to start with a hyphen.")" "pkgname"
+ return 1
+ fi
+ done
+
+ if [[ ${pkgbase:0:1} = "-" ]]; then
+ error "$(gettext "%s is not allowed to start with a hyphen.")" "pkgbase"
return 1
fi
if [[ $pkgver != ${pkgver//-/} ]]; then