From 14e33189f310b07d3f8249752f46da4679e3e0a3 Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Mon, 11 Nov 2013 15:11:22 -0800 Subject: [PATCH] =?UTF-8?q?the=20most=20subtle=20of=20bugs=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- home/shrc.zsh | 5 +++-- sh/mw | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/home/shrc.zsh b/home/shrc.zsh index 29dcbae..4626df3 100644 --- a/home/shrc.zsh +++ b/home/shrc.zsh @@ -19,7 +19,7 @@ has() { which "$1" >/dev/null && which "$1"; } # cleanup in case of inherited exports for x in AR CC CPP CXX CFLAGS CPPFLAGS CXXFLAGS LDFLAGS RANLIB RC WINDRES; do - export $x= + unset $x done export PREFIX="$HOME/opt/local" @@ -37,7 +37,7 @@ export GOPATH="$HOME/go" for x in ls dir vdir grep fgrep egrep; do alias $x="$x --color=auto" done -alias make="$(has colormake || has make)" +#alias make="$(has colormake || has make)" # just flags export LESS='-SR' @@ -66,5 +66,6 @@ alias unwrap='awk '\''BEGIN{RS="\n\n";FS="\n"}{for(i=1;i<=NF;i++)printf "%s ",$i alias picky='{ pacman -Qgq base base-devel | tee -; pacman -Qtnq; } | sort | uniq -u' alias unused='{ pacman -Qt; pacman -Qe | tee -; } | sort | uniq -u' +#. ~/mingw.sh . ~/sh/lsf.sh/lsf.sh . ~/sh/z/z.sh diff --git a/sh/mw b/sh/mw index e35fe6c..9df1910 100755 --- a/sh/mw +++ b/sh/mw @@ -20,7 +20,8 @@ mingw-disable() { local e= for e in PATH PREFIX CC CPP CXX CFLAGS CPPFLAGS CXXFLAGS LDFLAGS AR RANLIB RC WINDRES SDL_CFLAGS SDL_LDLIBS; do - export "$e=${_mw_[$e]}" + local v="${_mw_[$e]}" + [ -n "$v" ] && export "$e=$v" || unset "$e" done echo "mingw disabled" }