aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-21 23:15:24 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-21 23:15:24 +1200
commitb6e6a800e89795fddf75cf5f115f5cc2ae115f16 (patch)
treefe17a2fd66146c158258e0bd508aaece57fc24b0
parent4046e2282873a9622943172667e8f52347ad8017 (diff)
downloaddotfiles-b6e6a800e89795fddf75cf5f115f5cc2ae115f16.tar.gz
dotfiles-b6e6a800e89795fddf75cf5f115f5cc2ae115f16.zip
Style tweaks to profile.d subscripts
-rw-r--r--sh/profile.d/games.sh4
-rw-r--r--sh/profile.d/go.sh4
-rw-r--r--sh/profile.d/keychain.sh5
-rw-r--r--sh/profile.d/verse.sh4
4 files changed, 4 insertions, 13 deletions
diff --git a/sh/profile.d/games.sh b/sh/profile.d/games.sh
index b0dd1d35..58db3487 100644
--- a/sh/profile.d/games.sh
+++ b/sh/profile.d/games.sh
@@ -1,4 +1,2 @@
# Add ~/.local/games to PATH if it exists
-if [ -d "$HOME"/.local/games ] ; then
- PATH=$HOME/.local/games:$PATH
-fi
+[ -d "$HOME"/.local/games ] && PATH=$HOME/.local/games:$PATH
diff --git a/sh/profile.d/go.sh b/sh/profile.d/go.sh
index 86bf9994..35a4a803 100644
--- a/sh/profile.d/go.sh
+++ b/sh/profile.d/go.sh
@@ -3,6 +3,4 @@ GOPATH=$HOME/.local/gocode
export GOPATH
# Prepend GOPATH to PATH for the executables if it exists
-if [ -d "$GOPATH"/bin ] ; then
- PATH=$GOPATH/bin:$PATH
-fi
+[ -d "$GOPATH"/bin ] && PATH=$GOPATH/bin:$PATH
diff --git a/sh/profile.d/keychain.sh b/sh/profile.d/keychain.sh
index e5d46a41..66c23d32 100644
--- a/sh/profile.d/keychain.sh
+++ b/sh/profile.d/keychain.sh
@@ -3,10 +3,7 @@
export SSH_ASKPASS
# keychain setup
-if command -v keychain >/dev/null 2>&1 ; then
-
- # Run keychain as quickly and quietly as possible
+command -v keychain >/dev/null 2>&1 &&
eval "$(TERM=${TERM:-ansi} keychain \
--eval --ignore-missing --quick --quiet \
id_dsa id_rsa id_ecsda)"
-fi
diff --git a/sh/profile.d/verse.sh b/sh/profile.d/verse.sh
index 781d68bc..ef68bb93 100644
--- a/sh/profile.d/verse.sh
+++ b/sh/profile.d/verse.sh
@@ -18,9 +18,7 @@ command -v verse >/dev/null 2>&1 || return
# date); run in a subshell to keep vars out of global namespace
(
now=$(date +%Y-%m-%d)
- if [ -f "$HOME"/.verse ] ; then
- last=$(cat -- "$HOME"/.verse)
- fi
+ [ -f "$HOME"/.verse ] && last=$(cat -- "$HOME"/.verse)
[ "$now" \> "$last" ] || exit
verse
printf '\n'