diff options
author | Pete Travis <immanetize@fedoraproject.org> | 2014-09-26 14:42:22 -0600 |
---|---|---|
committer | Pete Travis <immanetize@fedoraproject.org> | 2014-09-26 14:42:22 -0600 |
commit | 46c50fce0354d81d347a8055314a688fc8aa9f52 (patch) | |
tree | b7f6c49e1225f949a9c21da6afa52fd04a2484fd /scratch/bash-3.1/examples/startup-files/apple/rc | |
parent | fe5673aed2053463a7164ec5e7b609877340c0fa (diff) | |
download | rpmbuild-obs-product.tar.gz rpmbuild-obs-product.tar.xz rpmbuild-obs-product.zip |
bash sourcesobs-product
Diffstat (limited to 'scratch/bash-3.1/examples/startup-files/apple/rc')
-rw-r--r-- | scratch/bash-3.1/examples/startup-files/apple/rc | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/scratch/bash-3.1/examples/startup-files/apple/rc b/scratch/bash-3.1/examples/startup-files/apple/rc new file mode 100644 index 0000000..2451b9f --- /dev/null +++ b/scratch/bash-3.1/examples/startup-files/apple/rc @@ -0,0 +1,63 @@ +## +# Bourne Again Shell config file +# +# Wilfredo Sanchez Jr. | tritan@mit.edu +# July 09, 1992 +# +# MIT Project Athena +# +# ORIGINAL SOURCES: /usr/athena/lib/init/cshrc (ATHENA REL 7.3P) +## + + default_initdir=/usr/share/init +default_bash_initdir=${default_initdir}/bash + user_initdir=~/Library/init + user_bash_initdir=${user_initdir}/bash + +if [ -r ${user_bash_initdir} ]; then + initdir=${user_initdir} + bash_initdir=${user_bash_initdir} +else + initdir=${default_initdir} + bash_initdir=${default_bash_initdir} +fi + +# SET UP HOST-DEPENDANT VARIABLES, ETC. + +host=$(echo $(hostname) | tr A-Z a-z) + +user=`whoami` + +export HOST=${host} +export USER=${user} + +# User ID +if [ -z "${uid}" ]; then uid=$(id | cut -d = -f 2 | cut -d \( -f 1); fi + +# SET COMMAND SEARCH PATH AND MAN PATH +if [ -f ${bash_initdir}/path ]; then source ${bash_initdir}/path; fi + +# ENVIRONMENT SETUP + +if [ -n "${PS1}" ]; then interactive="YES"; fi + +if [ -z "${ENV_SET}" ]; then + if [ -f ${default_bash_initdir}/environment ]; then + #echo "Initializing environment..." + source ${default_bash_initdir}/environment + fi +fi + +if [ -r ${default_bash_initdir}/bash.defaults ]; then + source ${default_bash_initdir}/bash.defaults +fi + +# DEFAULT LOGIN SOURCES +if [ -f ${bash_initdir}/rc.mine ]; then source ${bash_initdir}/rc.mine; fi + +if [ "${interactive}" = "YES" ]; then + # These aren't useful for non-interactive sessions + if [ -f ${default_bash_initdir}/aliases ]; then + source ${default_bash_initdir}/aliases + fi +fi |