aboutsummaryrefslogtreecommitdiffstats
path: root/examples/startup-files/apple/rc
diff options
context:
space:
mode:
authorcvpcs <root@cvpcs.org>2010-06-02 11:02:31 -0500
committercvpcs <root@cvpcs.org>2010-06-02 11:02:31 -0500
commit772f20abb0a3a0979c440114bf3a1cff5b3cef03 (patch)
tree3384b9291d73a12542c526a8557218c7435491b0 /examples/startup-files/apple/rc
downloadexternal_bash-772f20abb0a3a0979c440114bf3a1cff5b3cef03.zip
external_bash-772f20abb0a3a0979c440114bf3a1cff5b3cef03.tar.gz
external_bash-772f20abb0a3a0979c440114bf3a1cff5b3cef03.tar.bz2
initial import of bash 4.1
Diffstat (limited to 'examples/startup-files/apple/rc')
-rw-r--r--examples/startup-files/apple/rc63
1 files changed, 63 insertions, 0 deletions
diff --git a/examples/startup-files/apple/rc b/examples/startup-files/apple/rc
new file mode 100644
index 0000000..2451b9f
--- /dev/null
+++ b/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