diff options
author | Ben Sima <ben@bsima.me> | 2018-05-24 09:40:02 -0700 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2018-05-24 09:40:02 -0700 |
commit | 41a3077ff081400b3391e5bfb02533715364b167 (patch) | |
tree | 9d3d28235a08d01749f07e497530b62a5b894e16 /setpath.sh | |
parent | d3d4d6e971aa4893fde66fb1e0775f72470f8f50 (diff) |
Improve shell script with shellcheck
Diffstat (limited to 'setpath.sh')
-rw-r--r-- | setpath.sh | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1,16 +1,18 @@ #!/usr/bin/env sh # add some useful stuff to my path (if present) -OLDPATH=$PATH for DIR in \ $HOME/bin \ $HOME/me/bin \ $HOME/.local/bin do - if [ -d $DIR ] then + if [ -d "$DIR" ]; then PATH=$DIR:$PATH fi done # source nix.sh if present -[[ -f ~/.nix-profile/etc/profile.d/nix.sh ]] && . ~/.nix-profile/etc/profile.d/nix.sh +if [ -f ~/.nix-profile/etc/profile.d/nix.sh ]; then + # shellcheck source=/home/ben/.nix-profile/etc/profile.d/nix.sh + . ~/.nix-profile/etc/profile.d/nix.sh +fi |