aboutsummaryrefslogtreecommitdiffstats
path: root/.profile
diff options
context:
space:
mode:
Diffstat (limited to '.profile')
-rw-r--r--.profile10
1 files changed, 7 insertions, 3 deletions
diff --git a/.profile b/.profile
index 09bef4a..760945f 100644
--- a/.profile
+++ b/.profile
@@ -18,11 +18,15 @@ export QT4_IM_MODULE="fcitx"
###### PATH ######
# $HOME/bin
-export PATH=$HOME/bin:$PATH
+if [ -d "$HOME/bin" ]; then
+ export PATH="$HOME/bin:$PATH"
+fi
+# admin
+if `groups | grep -qE '\b(wheel|adm|sudo)\b'`; then
+ export PATH="$PATH:/usr/local/sbin:/usr/sbin:/sbin"
+fi
# TeXlive
export PATH=$PATH:/usr/local/texlive/bin/x86_64-linux
-# admin
-export PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin
###### gpg agent ######
eval "$(gpg-agent --daemon)"