comparison .bash_mozilla @ 551:029c7c2c511d

stub
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 19 Nov 2013 11:58:05 -0800
parents
children 752e5eea7ea8
comparison
equal deleted inserted replaced
550:9149b35b8a2a 551:029c7c2c511d
1 #!/bin/bash
2
3 # mozilla-specific bash customizations
4
5 MOZCONFIGS=${HOME}/mozilla/mozconfigs
6
7 mozconfig() {
8
9 if [ ! -e ${MOZCONFIGS} ]
10 then
11 echo "MOZCONFIGS directory ${MOZCONFIGS} does not exist"
12 return 1
13 fi
14
15 if [[ "$#" == "0" ]]
16 then
17 # list the available configs
18 ls -1 ${MOZCONFIGS} | sort
19 elif [[ "$#" == "1" ]]
20 then
21 # activate the chosen mozconfig
22 name=$1
23 for _MOZCONFIG in "${MOZCONFIGS}/${name}" "${MOZCONFIGS}/mozconfig.${name}"
24 do
25 echo $_MOZCONFIG
26 done
27 else
28 # print usage
29 echo "Usage: mozconfig <configname>"
30 return 1
31 fi
32
33 }