index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Cedric Staniewski <cedric@gmx.ca> | 2009-10-26 13:21:43 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2009-11-15 19:30:23 -0600 |
commit | 564352c4a2d12050d7b4c386e972976a24f1f993 (patch) | |
tree | 4379f92b1f7a62b1758bc94d709298b3e3595e74 /scripts/makepkg.sh.in | |
parent | 9c34dfd908480baed06bb2e618d8899fb8728dbd (diff) |
-rw-r--r-- | scripts/makepkg.sh.in | 13 |
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 |