summaryrefslogtreecommitdiff
path: root/environment
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2017-04-20 16:15:17 +1200
committerDavid Phillips <david@sighup.nz>2017-04-20 16:15:17 +1200
commit04fcec2c19fd804482f12245f5bf0575e4c64e5d (patch)
tree46a1fe4adaa21739fcf816a6ed0941a4f8ea1910 /environment
parentaffa6979c6f45618d3c2eb6ff691158fde09accc (diff)
downloaddotfiles-04fcec2c19fd804482f12245f5bf0575e4c64e5d.tar.xz
Fix cc stuff
Diffstat (limited to 'environment')
-rw-r--r--environment9
1 files changed, 7 insertions, 2 deletions
diff --git a/environment b/environment
index 1ae64ba..9f4a5d3 100644
--- a/environment
+++ b/environment
@@ -1,10 +1,15 @@
+#!/bin/sh
+
export GPG_TTY=$(tty)
export EDITOR=/usr/bin/vim
-if $(which clang 2>/dev/null); then
+if hash clang 2>/dev/null; then
export CC=clang
export CXX=clang
-elif [[ $(which tcc 2>/dev/null) && !$(which gcc 2>/dev/null) ]]; then
+elif hash gcc 2>/dev/null ; then
+ export CC=gcc
+ export CXX=g++
+elif hash tcc 2>/dev/null ; then
export CC=tcc
fi