28 lines
1.2 KiB
Bash
28 lines
1.2 KiB
Bash
#!/bin/bash
|
|
# uncomment these for debugging.
|
|
echo sourcing system wide bash.bashrc
|
|
[ $EUID -eq 0 ] && echo 'Root User' || echo 'Non Root User'
|
|
[[ $- == *i* ]] && echo 'Interactive' || echo 'Not interactive'
|
|
shopt -q login_shell && echo 'Login shell' || echo 'Not login shell'
|
|
|
|
# Using base shell setup repository
|
|
# https://git.kebler.net/kebler.net/bash-shell-base.git
|
|
export BASH_SHELL_LOAD=load.sh # script to run that loads in base shell repo
|
|
# use these two if you want a common directory for all shell repos
|
|
export BASH_SHELL=/opt/bash/shell # set this based on where you cloned the base repo
|
|
export BASH_SHELL_BASE=$BASH_SHELL/base
|
|
# otherwise uncomment
|
|
# export BASH_SHELL_BASE=/opt/shell/base # set this based on where you cloned the base repo
|
|
# if uncommented next line sets up implicit sourcing for non-interactive shells
|
|
export BASH_ENV=$BASH_SHELL_BASE/$BASH_SHELL_LOAD # use base repo
|
|
# this gets the ball rolling my loading the base shell
|
|
source $BASH_SHELL_BASE/$BASH_SHELL_LOAD
|
|
|
|
# if not using implicit sourcing for non-interactive shells then on can do this per script likely
|
|
##################
|
|
# source $BASH_SHELL_BASE/load.sh
|
|
# shopt -s expand_aliases
|
|
# < your script code >
|
|
# shopt -u expand_aliases
|
|
####################
|