scripts/features.sh: rm accidentally pushed set -A & quote whole string

This commit is contained in:
Jan-Tarek Butt 2019-12-14 17:30:03 +01:00
parent c119256ce8
commit 6a4bc45f90

View File

@ -34,7 +34,7 @@ sanitize() {
vars=() vars=()
for feature in $1; do for feature in $1; do
if [ "$(type -t gluon_feature_nodefault_"${feature}")" != 'function' ]; then if [ "$(type -t "gluon_feature_nodefault_${feature}")" != 'function' ]; then
echo "gluon-${feature}" echo "gluon-${feature}"
fi fi
@ -58,9 +58,7 @@ packages() {
# Let will return false when the result of the passed expression is 0, # Let will return false when the result of the passed expression is 0,
# so we always add 1. This way false is only returned for syntax errors. # so we always add 1. This way false is only returned for syntax errors.
set -A
local ret="$(env -i "${vars[@]}" bash --norc -ec "let _result_='1+($cond)'; echo -n \"\$_result_\"" 2>/dev/null)" local ret="$(env -i "${vars[@]}" bash --norc -ec "let _result_='1+($cond)'; echo -n \"\$_result_\"" 2>/dev/null)"
set +A
case "$ret" in case "$ret" in
2) 2)
for pkg in "$@"; do for pkg in "$@"; do