summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/makepkg.sh.in5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index d387b7d7..fce75588 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -830,8 +830,9 @@ check_buildenv() {
in_opt_array() {
local needle=$1; shift
- local opt
- for opt in "$@"; do
+ local i opt
+ for (( i = $#; i > 0; i-- )); do
+ opt=${!i}
if [[ $opt = "$needle" ]]; then
# enabled
return 0