summaryrefslogtreecommitdiff
path: root/.shenv
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2015-02-22 22:00:29 +0900
committerSean Whitton <spwhitton@spwhitton.name>2015-02-22 22:00:29 +0900
commit7838888441d0930a12a0361bca65d23097755cf0 (patch)
tree2be3e713cf0225afeabed7b7b8a11d0ffd9c1de7 /.shenv
parent105c12b1d22dbb1f079358951f2fd689142cfc25 (diff)
downloaddotfiles-7838888441d0930a12a0361bca65d23097755cf0.tar.gz
try to avoid nix paths in $PATH more than once
Diffstat (limited to '.shenv')
-rwxr-xr-x.shenv7
1 files changed, 5 insertions, 2 deletions
diff --git a/.shenv b/.shenv
index 72c715ed..280e8c5e 100755
--- a/.shenv
+++ b/.shenv
@@ -65,8 +65,11 @@ export PATH
# ---- package management by Nix: add to $PATH once more
-if [ -e "/etc/profile.d/nix.sh" ]; then
- . /etc/profile.d/nix.sh
+# crude heuristic to determine if it's already been added
+if ! echo $PATH | grep -q "$HOME/.nix-profile/bin"; then
+ if [ -e "/etc/profile.d/nix.sh" ]; then
+ . /etc/profile.d/nix.sh
+ fi
fi
# ---- set language (snippet from joeyh's home-etc.git repo)