cc-wrapper: use Bash arrays properly

This commit is contained in:
Nikolay Amiantov 2016-03-24 21:12:48 +03:00
parent db6ae35bd9
commit 119c287c71
2 changed files with 4 additions and 4 deletions

View File

@ -84,7 +84,7 @@ if [ "$NIX_ENFORCE_PURITY" = 1 -a -n "$NIX_STORE" ]; then
elif [ "$p" = -isystem ] && badPath "$p2"; then
n=$((n + 1)); skip $p2
else
rest=("${rest[@]}" "$p")
rest+=("$p")
fi
n=$((n + 1))
done
@ -99,7 +99,7 @@ if [ "$NIX_ENFORCE_NO_NATIVE" = 1 ]; then
if [[ "$i" = -m*=native ]]; then
skip $i
else
rest=("${rest[@]}" "$i")
rest+=("$i")
fi
done
params=("${rest[@]}")

View File

@ -62,7 +62,7 @@ if [ "$NIX_ENFORCE_PURITY" = 1 -a -n "$NIX_STORE" ]; then
elif [ "${p:0:4}" = -aO/ ] && badPath "${p:3}"; then
skip $p
else
rest=("${rest[@]}" "$p")
rest+=("$p")
fi
n=$((n + 1))
done
@ -77,7 +77,7 @@ if [ "$NIX_ENFORCE_NO_NATIVE" = 1 ]; then
if [[ "$i" = -m*=native ]]; then
skip $i
else
rest=("${rest[@]}" "$i")
rest+=("$i")
fi
done
params=("${rest[@]}")