aboutsummaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-02-18 21:32:35 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-02-18 21:32:35 +1300
commit9d6eab06055d26a22384d7aca34214cbcd904584 (patch)
tree0f719a0c48786a9176f237ca673fead9593499ca /sh
parentAdd missing man page section for tm(1df) iN README (diff)
downloaddotfiles-9d6eab06055d26a22384d7aca34214cbcd904584.tar.gz
dotfiles-9d6eab06055d26a22384d7aca34214cbcd904584.zip
Use short-circuits in .profile.d scripts
Diffstat (limited to 'sh')
-rw-r--r--sh/profile.d/games.sh3
-rw-r--r--sh/profile.d/keychain.sh8
2 files changed, 6 insertions, 5 deletions
diff --git a/sh/profile.d/games.sh b/sh/profile.d/games.sh
index 58db3487..ee56c593 100644
--- a/sh/profile.d/games.sh
+++ b/sh/profile.d/games.sh
@@ -1,2 +1,3 @@
# Add ~/.local/games to PATH if it exists
-[ -d "$HOME"/.local/games ] && PATH=$HOME/.local/games:$PATH
+[ -d "$HOME"/.local/games ] || return
+PATH=$HOME/.local/games:$PATH
diff --git a/sh/profile.d/keychain.sh b/sh/profile.d/keychain.sh
index 9213de7f..f3d25c62 100644
--- a/sh/profile.d/keychain.sh
+++ b/sh/profile.d/keychain.sh
@@ -1,5 +1,5 @@
# keychain setup
-command -v keychain >/dev/null 2>&1 &&
- eval "$(TERM=${TERM:-ansi} keychain \
- --eval --ignore-missing --quick --quiet \
- id_dsa id_rsa id_ecsda)"
+command -v keychain >/dev/null 2>&1 || return
+eval "$(TERM=${TERM:-ansi} keychain \
+ --eval --ignore-missing --quick --quiet \
+ id_dsa id_rsa id_ecsda)"