From c8940fb4ea5dddfc602a2b2df97c6bd40ff25e4a Mon Sep 17 00:00:00 2001 From: "kebler.net" Date: Mon, 19 Apr 2021 17:25:22 -0700 Subject: [PATCH] look for bash command and set to SHELL instead of looking for bash in SHELL environment --- shell.env | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/shell.env b/shell.env index fe48698..3fd6857 100644 --- a/shell.env +++ b/shell.env @@ -1,8 +1,8 @@ #!/bin/bash # Shell Repos Environment -# echo loading shell.env -# if bash is not the shell don't bother to continue -[ ! "$SHELL" = "/bin/bash" ] && return 1 +# if bash is not installed then don't bother to continue +! command -v bash >/dev/null 2>&1 && echo no bash command && return 1 +export SHELL=$(command -v bash ) # sourced for non-login interactive shells # sourced via /etc/bash.bashrc so for all machine users # $BASH_SHELL_BASE # this MUST be set in /etc/profile @@ -31,7 +31,6 @@ # load script in base repo to run export BASH_SHELL_LOAD=$BASH_SHELL_BASE/load.sh # load.sh is default export BASH_SHELL_STARTUP=$BASH_SHELL_BASE/startup.sh # strtup.sh is default - # if uncommented next lines sets up implicit sourcing for non-interactive shells # echo ----NON_INTERACTIVE SHELL INFO----- # echo enabling bash shell repos for non-inactive shell @@ -104,3 +103,5 @@ export BASH_SHELL_DIRS=$(echo $temp) # now load and export module loading functions library source $BASH_SHELL_BASE/module.lib + +# echo end shell env