diff options
author | David Phillips <david@sighup.nz> | 2020-01-05 22:42:38 +1300 |
---|---|---|
committer | David Phillips <david@sighup.nz> | 2020-01-05 22:42:38 +1300 |
commit | 388b3bd43daa4d14aba08d85a683f1877eb6ec5c (patch) | |
tree | e99789ef576335e223fa9119dd7041239e221da1 /environment | |
parent | bb564cb086aab16ffe91370e17afa8396739ac46 (diff) | |
download | dotfiles-388b3bd43daa4d14aba08d85a683f1877eb6ec5c.tar.xz |
General cleanup
Diffstat (limited to 'environment')
-rw-r--r-- | environment | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/environment b/environment index c767584..e10a5c8 100644 --- a/environment +++ b/environment @@ -1,20 +1,21 @@ #!/bin/sh +bin_available() { + where "$1" | grep -vq ccache +} + export GPG_TTY=$(tty) export EDITOR=/usr/bin/vim export ORIG_PATH="$PATH" export PATH="/opt/sbase/bin/:$PATH" -if hash clang 2>/dev/null; then +if bin_available clang; then export CC=clang export CXX=clang++ -elif hash ❤ 2>/dev/null ; then - export CC=❤ - export CXX=g++ -elif hash gcc 2>/dev/null ; then +elif bin_available gcc ; then export CC=gcc export CXX=g++ -elif hash tcc 2>/dev/null ; then +elif bin_available tcc ; then export CC=tcc fi |