summaryrefslogtreecommitdiff
path: root/environment
blob: e10a5c8f038825e550c6c4345e70e77b9b57a466 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/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 bin_available clang; then
	export CC=clang
	export CXX=clang++
elif bin_available gcc ; then
	export CC=gcc
	export CXX=g++
elif bin_available tcc ; then
	export CC=tcc
fi

# Do separate paths on '/' for word operations like ^W
WORDCHARS=${WORDCHARS/\//}

# u=rwx,g=,o=
umask 077