From 3dc91eea6dd234046d4f86af0e04ba4bac3fbefc Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 1 Feb 2014 21:22:23 -0500 Subject: [PATCH] profile.d: use POSIX shell compliant style --- .profile.d/ROOT-bash_profile | 2 +- .profile.d/keychain.sh | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.profile.d/ROOT-bash_profile b/.profile.d/ROOT-bash_profile index 86795d7..d1fb79b 100644 --- a/.profile.d/ROOT-bash_profile +++ b/.profile.d/ROOT-bash_profile @@ -1 +1 @@ -source ~/.bashrc +. ~/.bashrc diff --git a/.profile.d/keychain.sh b/.profile.d/keychain.sh index 436d21f..8934549 100644 --- a/.profile.d/keychain.sh +++ b/.profile.d/keychain.sh @@ -1,4 +1,5 @@ -if type -P keychain >/dev/null ; then - [ -e ~/.keychain/${HOSTNAME}-sh ] && source ~/.keychain/${HOSTNAME}-sh - [ -e ~/.keychain/${HOSTNAME}-sh-gpg ] && source ~/.keychain/${HOSTNAME}-sh-gpg +if type keychain >/dev/null 2>&1 ; then + : ${HOSTNAME:=$(hostname)} + [ -e ~/.keychain/${HOSTNAME}-sh ] && . ~/.keychain/${HOSTNAME}-sh + [ -e ~/.keychain/${HOSTNAME}-sh-gpg ] && . ~/.keychain/${HOSTNAME}-sh-gpg fi -- 2.39.5