summary refs log tree commit diff
path: root/pkgs/build-support/gcc-wrapper/setup-hook.sh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-10-10 14:25:23 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-10-11 22:26:39 +0200
commit02122ccfd0f4c4156c38662622831e7b6b98dbc8 (patch)
tree3f1329f3a34a44019027710719d9cec8a98c3251 /pkgs/build-support/gcc-wrapper/setup-hook.sh
parentffbdcbfe29ea1076e87a321f47df39cd1ddc4d6b (diff)
gcc-wrapper: Style fix
Diffstat (limited to 'pkgs/build-support/gcc-wrapper/setup-hook.sh')
-rw-r--r--pkgs/build-support/gcc-wrapper/setup-hook.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/pkgs/build-support/gcc-wrapper/setup-hook.sh b/pkgs/build-support/gcc-wrapper/setup-hook.sh
index a3ada9e984fd9..93b20fa1e99a2 100644
--- a/pkgs/build-support/gcc-wrapper/setup-hook.sh
+++ b/pkgs/build-support/gcc-wrapper/setup-hook.sh
@@ -1,15 +1,15 @@
 export NIX_GCC=@out@
 
 addCVars () {
-    if test -d $1/include; then
+    if [ -d $1/include ]; then
         export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -isystem $1/include"
     fi
 
-    if test -d $1/lib64; then
+    if [ -d $1/lib64 -a ! -L $1/lib64 ]; then
         export NIX_LDFLAGS="$NIX_LDFLAGS -L$1/lib64"
     fi
 
-    if test -d $1/lib; then
+    if [ -d $1/lib ]; then
         export NIX_LDFLAGS="$NIX_LDFLAGS -L$1/lib"
     fi
 }
@@ -18,18 +18,18 @@ envHooks+=(addCVars)
 
 # Note: these come *after* $out in the PATH (see setup.sh).
 
-if test -n "@gcc@"; then
+if [ -n "@gcc@" ]; then
     addToSearchPath PATH @gcc@/bin
 fi
 
-if test -n "@binutils@"; then
+if [ -n "@binutils@" ]; then
     addToSearchPath PATH @binutils@/bin
 fi
 
-if test -n "@libc@"; then
+if [ -n "@libc@" ]; then
     addToSearchPath PATH @libc@/bin
 fi
 
-if test -n "@coreutils@"; then
+if [ -n "@coreutils@" ]; then
     addToSearchPath PATH @coreutils@/bin
 fi