shell-base/setup/etc/bash.bashrc

16 lines
620 B
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'
# ([ -n "$SSH_CONNECTION" ] || [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]) && echo ssh remote user || echo local user
# echo ---------------------
if ([ -n "$SSH_CONNECTION" ] || [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]); then
export SSH_SESSION=true
source /etc/profile
fi
shopt -s expand_aliases
source $BASH_SHELL_LOAD