From: Simon Ruderich Date: Wed, 10 Sep 2014 12:19:19 +0000 (+0200) Subject: setup.sh: fix setup if LD_PRELOAD is not set X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=1aa17ff0f406fc37d4c84fe432142148fef10ac7;p=config%2Fdotfiles.git setup.sh: fix setup if LD_PRELOAD is not set --- diff --git a/setup.sh b/setup.sh index 3f49ad5..3064ade 100755 --- a/setup.sh +++ b/setup.sh @@ -49,7 +49,8 @@ if installed git; then fi # If coloredstderr is used to color stderr then remove the workaround for # missing output to stderr. - if printf '%s' "$LD_PRELOAD" | grep libcoloredstderr.so >/dev/null; then + if test -n "${LD_PRELOAD:+set}" \ + && printf '%s' "$LD_PRELOAD" | grep libcoloredstderr.so >/dev/null; then echo 'gitconfig: removing stderr fix' sed_i '/^\t\(fs\|fg\) =/ s/2>&1//' gitconfig fi