# HG changeset patch # User Jeff Hammel # Date 1384891085 28800 # Node ID 029c7c2c511df44a870cfa4c5f1152f9e1a70116 # Parent 9149b35b8a2a1fd082df7506f54707022031cb41 stub diff -r 9149b35b8a2a -r 029c7c2c511d .bash_mozilla --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.bash_mozilla Tue Nov 19 11:58:05 2013 -0800 @@ -0,0 +1,33 @@ +#!/bin/bash + +# mozilla-specific bash customizations + +MOZCONFIGS=${HOME}/mozilla/mozconfigs + +mozconfig() { + +if [ ! -e ${MOZCONFIGS} ] +then + echo "MOZCONFIGS directory ${MOZCONFIGS} does not exist" + return 1 +fi + +if [[ "$#" == "0" ]] +then + # list the available configs + ls -1 ${MOZCONFIGS} | sort +elif [[ "$#" == "1" ]] +then + # activate the chosen mozconfig + name=$1 + for _MOZCONFIG in "${MOZCONFIGS}/${name}" "${MOZCONFIGS}/mozconfig.${name}" + do + echo $_MOZCONFIG + done +else + # print usage + echo "Usage: mozconfig " + return 1 +fi + +} \ No newline at end of file