#!/bin/bash # PRIMARY SHELL LOAD SCRIPT - RUN FOR ALL INTERACTIVE SHELLS # don't bother if bash is not the shell [ ! "$SHELL" = "/bin/bash" ] && return 1 # ************ be sure module_load function is availABLE *************************** [[ $(declare -F | grep module_load) ]] || source "$BASH_SHELL_BASE/module.lib" module_load debug if [[ $? -ne 0 ]]; then echo "unable to load a 'debug' module using a noop for debug function" # noop function debug () { : } fi ([[ $BASH_ENV ]] && [[ ! $- == *i* ]] && [[ $BASH_USE_ALIAS ]]) && shopt -s expand_aliases # process the base directory by default unset BASH_SHELL_BASE_LOADED unset BASH_SHELL_LOADED module_load shell-process-directory for dir in ${1:-$BASH_SHELL_DIRS}; do # echo $dir shell_process_directory $dir [[ $dir == "$BASH_SHELL_BASE" ]] && BASH_SHELL_BASE_LOADED=true done export BASH_SHELL_LOADED=true # Note: $HOME/shell or $HOME/BASH_SHELL_USER are processed via $HOME/.bashrc