1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-11-05 06:39:02 -08:00

basic install checking

This commit is contained in:
Connor Olding 2013-09-15 20:33:04 -07:00
parent a9be56a8f3
commit c7b12d340c

View file

@ -15,13 +15,15 @@ ify() {
$@ | $ex $@ | $ex
} }
has() { which "$1" >/dev/null && which "$1"; }
# cleanup in case of inherited exports # cleanup in case of inherited exports
for x in AR CC CPP CXX CFLAGS CPPFLAGS CXXFLAGS LDFLAGS RANLIB RC WINDRES; do for x in AR CC CPP CXX CFLAGS CPPFLAGS CXXFLAGS LDFLAGS RANLIB RC WINDRES; do
export $x= export $x=
done done
export PREFIX="$HOME/opt/local" export PREFIX="$HOME/opt/local"
export CC=clang export CC="$(has clang || has gcc)"
export CFLAGS='-march=native -O2' export CFLAGS='-march=native -O2'
export LDFLAGS='-Wl,-O1,--sort-common,-z,relro' export LDFLAGS='-Wl,-O1,--sort-common,-z,relro'
export CFLAGS="$CFLAGS -I'$HOME/opt/local/include'" export CFLAGS="$CFLAGS -I'$HOME/opt/local/include'"
@ -35,7 +37,7 @@ export GOPATH="$HOME/go"
for x in ls dir vdir grep fgrep egrep; do for x in ls dir vdir grep fgrep egrep; do
alias $x="$x --color=auto" alias $x="$x --color=auto"
done done
alias make="colormake" alias make="$(has colormake || has make)"
# just flags # just flags
export LESS='-SR' export LESS='-SR'