-
Notifications
You must be signed in to change notification settings - Fork 2
/
common.sh
42 lines (31 loc) · 1.12 KB
/
common.sh
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Hold common config between all the shells I use.
# Currently bash and zsh
export PAGER=less
export VISUAL=nvim
export EDITOR="$VISUAL"
# For user level installation
PATH=$HOME/.local/bin:$PATH
# For system level installtation by privileged user
PATH=$PATH:/usr/local/go/bin
# Check if go is installed, then set go related vars
if [ -x "$(command -v go)" ]; then
# If host system is Amazon Linux, GOPATH should go in /efs
if uname -r | grep -q 'amzn'; then
export GOPATH=/efs/system/go
else
export GOPATH=$(go env GOPATH)
fi
export GOBIN=$GOPATH/bin
PATH=$PATH:$GOBIN
fi
export PATH=$PATH:/var/lib/snapd/snap/bin
# On debian based systems, this value of LD_PRELOAD shows errors
if [ -x "$(grep -q rhel /etc/os-release)" ]; then
export LD_PRELOAD=/usr/lib64/libstdc++.so.6:/lib64/libgcc_s.so.1
fi
# As we are inside tmux, let terminal support 256 colors,
# so vim can show colorschemes properly inside tmux
if [[ $TERM == screen ]]; then TERM=screen-256color; fi
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
# If using user level ranger config, avoid reloading the system one
export RANGER_LOAD_DEFAULT_RC=FALSE