changeset 554:8ef38b16dcb9

.bash_mozilla
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 19 Nov 2013 14:04:49 -0800
parents 752e5eea7ea8
children f98fe4362c84
files .bash_mozilla
diffstat 1 files changed, 19 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/.bash_mozilla	Tue Nov 19 13:09:36 2013 -0800
+++ b/.bash_mozilla	Tue Nov 19 14:04:49 2013 -0800
@@ -3,6 +3,7 @@
 # mozilla-specific bash customizations
 
 MOZCONFIGS=${HOME}/mozilla/mozconfigs
+MOZSRC=${HOME}/mozilla/src
 
 mozconfig() {
 
@@ -24,7 +25,6 @@
     do
         if [[ -e "${_MOZCONFIG}" ]]
         then
-            echo "Using MOZCONFIG : ${_MOZCONFIG}"
             break
         fi
     done
@@ -33,6 +33,24 @@
         echo "MOZCONFIG ${name} not found"
         return 1
     fi
+
+    # get name of file
+    filename=$(basename $_MOZCONFIG)
+    if [[ "${filename}" == *.* ]]
+    then
+        name="${filename##*.}"
+        prefix="${name}"
+    else
+        name=".default."
+        prefix="obj"
+    fi
+
+    # set environment variables
+    export MOZCONFIG=${_MOZCONFIG}
+
+    # print info
+    echo "Using MOZCONFIG=${MOZCONFIG} [${name}] :"
+    cat "${MOZCONFIG}"
 else
     # print usage
     echo "Usage: mozconfig <configname>"