3
0
Fork 0
forked from mirrors/nixpkgs

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 elif [ "$p" = -isystem ] && badPath "$p2"; then
n=$((n + 1)); skip $p2 n=$((n + 1)); skip $p2
else else
rest=("${rest[@]}" "$p") rest+=("$p")
fi fi
n=$((n + 1)) n=$((n + 1))
done done
@ -99,7 +99,7 @@ if [ "$NIX_ENFORCE_NO_NATIVE" = 1 ]; then
if [[ "$i" = -m*=native ]]; then if [[ "$i" = -m*=native ]]; then
skip $i skip $i
else else
rest=("${rest[@]}" "$i") rest+=("$i")
fi fi
done done
params=("${rest[@]}") 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 elif [ "${p:0:4}" = -aO/ ] && badPath "${p:3}"; then
skip $p skip $p
else else
rest=("${rest[@]}" "$p") rest+=("$p")
fi fi
n=$((n + 1)) n=$((n + 1))
done done
@ -77,7 +77,7 @@ if [ "$NIX_ENFORCE_NO_NATIVE" = 1 ]; then
if [[ "$i" = -m*=native ]]; then if [[ "$i" = -m*=native ]]; then
skip $i skip $i
else else
rest=("${rest[@]}" "$i") rest+=("$i")
fi fi
done done
params=("${rest[@]}") params=("${rest[@]}")