2020-11-10 14:09:08 -08:00
|
|
|
#!/bin/bash
|
2021-03-09 13:13:23 -08:00
|
|
|
#uncomment these for debugging.
|
|
|
|
# echo ---- sourcing system .bashrc for user $USER ---
|
|
|
|
# [[ $USER_ROOT ]] && echo 'Root User' || echo 'Non Root User'
|
|
|
|
# [[ $SHELL_INTERACTIVE ]] && echo 'Interactive' || echo 'Not interactive'
|
|
|
|
# [[ $SHELL_LOGIN ]] && echo 'Login shell' || echo 'Not login shell'
|
|
|
|
# [[ $SSH_SESSION ]] && echo ssh remote user || echo local user
|
|
|
|
# env | grep BASH
|
|
|
|
# echo ---------------------
|
|
|
|
|
|
|
|
if ( [[ $SHELL_INTERACTIVE ]] );then
|
|
|
|
if ( [[ $BASH_SHELL_BASE_LOADED = true ]] ) ; then
|
|
|
|
# echo loading user shell sources
|
2021-12-31 17:38:58 -08:00
|
|
|
export BASH_SHELL_USER=${BASH_SHELL_USER:-"shell"}
|
2021-03-09 13:13:23 -08:00
|
|
|
[[ -d $HOME/$BASH_SHELL_USER ]] && shell_process_directory "$HOME/$BASH_SHELL_USER" ||\
|
|
|
|
echo no user shell directory $HOME/$BASH_SHELL_USER to process, create one or clone a template
|
|
|
|
fi
|
|
|
|
# uncomment to add non-interactive setup/sourcing
|
|
|
|
# else
|
|
|
|
# echo non-login and non-interactive
|
|
|
|
fi
|
|
|
|
|
|
|
|
# anything below will be sourced by all shell types (except non-interactive/login)
|