From 998695b1ba190e1ceaa6bb6b79df5cdf3c12187a Mon Sep 17 00:00:00 2001 From: Buddy Sandidge Date: Sun, 13 Dec 2020 17:01:23 -0800 Subject: [PATCH] Fix checking for the shell being run is bash or zsh --- base/.profile | 3 +-- base/.zprofile | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 base/.zprofile diff --git a/base/.profile b/base/.profile index 87626b4..bedc6d7 100644 --- a/base/.profile +++ b/base/.profile @@ -42,8 +42,7 @@ if [ -d "${XDG_CONFIG_HOME}/profile/profile.d" ]; then done fi - -if [ "${SHELL}" = /bin/bash ] || [ "${SHELL}" = /usr/local/bin/bash ]; then +if [ "${BASH_VERSION}" != "" ] && [ "$(ps -p $$ -ocomm=)" != sh ]; then # shellcheck disable=SC1090 if [ -f "${HOME}/.bashrc" ]; then . "${HOME}/.bashrc" diff --git a/base/.zprofile b/base/.zprofile new file mode 100644 index 0000000..70bd631 --- /dev/null +++ b/base/.zprofile @@ -0,0 +1 @@ +source $HOME/.profile