Mercurial > hg > config
diff .bash_mozilla @ 551:029c7c2c511d
stub
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Tue, 19 Nov 2013 11:58:05 -0800 |
parents | |
children | 752e5eea7ea8 |
line wrap: on
line diff
--- /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 <configname>" + return 1 +fi + +} \ No newline at end of file