From 119c287c7177e6abcb43e1eb9e0e9e1b3456cdf7 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Thu, 24 Mar 2016 21:12:48 +0300 Subject: [PATCH] cc-wrapper: use Bash arrays properly --- pkgs/build-support/cc-wrapper/cc-wrapper.sh | 4 ++-- pkgs/build-support/cc-wrapper/gnat-wrapper.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/build-support/cc-wrapper/cc-wrapper.sh b/pkgs/build-support/cc-wrapper/cc-wrapper.sh index 3b6f2acfee8b..3c3dbc03d413 100644 --- a/pkgs/build-support/cc-wrapper/cc-wrapper.sh +++ b/pkgs/build-support/cc-wrapper/cc-wrapper.sh @@ -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[@]}") diff --git a/pkgs/build-support/cc-wrapper/gnat-wrapper.sh b/pkgs/build-support/cc-wrapper/gnat-wrapper.sh index 4b3ba386917c..012f826a111e 100644 --- a/pkgs/build-support/cc-wrapper/gnat-wrapper.sh +++ b/pkgs/build-support/cc-wrapper/gnat-wrapper.sh @@ -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[@]}")