Commits

Michael Forbes committed c136737

Updated env file in lieu of no local functions.

  • Participants
  • Parent commits 40d36ed

Comments (0)

Files changed (1)

File mmf_environment

 # Environment file; -*-Shell-script-*-
+# Add something like the following to your .bashrc file (pointing to 
+# this file):
+#
+# function mmfmode {
+#     . load "hg_work/mmfbb.common-shell/mmf_environment"source
+# }
 # Source this file to setup your environment.
 
 if [ -a ~/.trace ]; then
 fi
 
 # Put everything in a function so we don't pollute the environment
-function run {
+function _run {
     ######################################################################
     # Helper functions and variables
 
     local DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
 
     # Source files if they exist, or complain.
-    function source {
+    function _source {
         file="${DIR}/$*"
         if [ -f "${file}" ]; then
             . "${file}"
         fi
     }
 
-    # Appends path $2 to $1
-    function append_path () {
-        export $1="${!1}:$2"
-    }
-
     ######################################################################
     # The Work
     
     # Enables bash tab-completion when using mercurial.
-    source hg_bash_completion
+    _source hg_bash_completion
     
     # Add scripts to path
-    append_path PATH ${DIR}/bin 
+    export PATH="${PATH}:${DIR}/bin"
 }
 
-run
-
-
-
-
+_run