This repository has been archived on 2022-02-20. You can view files and clone it, but cannot push or open issues/pull-requests.
bash-shell-base/setup/etc/bash.bashrc

18 lines
710 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
# global debug on or off via debug_on debug_off aliases
# can add this export to any file
#export BASH_DEBUG=true
source $BASH_SHELL_LOAD