index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dave Reisner <dreisner@archlinux.org> | 2014-08-09 18:08:13 -0400 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2014-09-23 21:43:16 +1000 |
commit | 9c066dff439ba453f4c362e1875b794cf3f362ed (patch) | |
tree | a92bb63ed23bcf8d0a1ba1abb6199b693fc6544b | |
parent | 85c055da73022838c13acae0554e6efa75dacf83 (diff) |
-rw-r--r-- | scripts/makepkg.sh.in | 14 |
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 2518e668..49f5e599 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -2359,13 +2359,21 @@ lint_epoch() { } lint_arch() { - local name list=("${@:-"${arch[@]}"}") + local a name list - if [[ $list == 'any' ]]; then + if [[ $arch == 'any' ]]; then return 0 fi - if ! in_array "$CARCH" "${list[@]}" && (( ! IGNOREARCH )); then + for a in "${arch[@]}"; do + if [[ $a = *[![:alnum:]_]* ]]; then + error "$(gettext "%s contains invalid characters: '%s'")" \ + 'arch' "${a//[[:alnum:]_]}" + ret=1 + fi + done + + if (( ! IGNOREARCH )) && ! in_array "$CARCH" "${arch[@]}"; then error "$(gettext "%s is not available for the '%s' architecture.")" "$pkgbase" "$CARCH" plain "$(gettext "Note that many packages may need a line added to their %s")" "$BUILDSCRIPT" plain "$(gettext "such as %s.")" "arch=('$CARCH')" |