diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2015-02-22 22:00:29 +0900 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2015-02-22 22:00:29 +0900 |
commit | 7838888441d0930a12a0361bca65d23097755cf0 (patch) | |
tree | 2be3e713cf0225afeabed7b7b8a11d0ffd9c1de7 /.shenv | |
parent | 105c12b1d22dbb1f079358951f2fd689142cfc25 (diff) | |
download | dotfiles-7838888441d0930a12a0361bca65d23097755cf0.tar.gz |
try to avoid nix paths in $PATH more than once
Diffstat (limited to '.shenv')
-rwxr-xr-x | .shenv | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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) |