diff options
author | Jonas Smedegaard <dr@jones.dk> | 2010-08-09 14:49:59 -0400 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2010-08-09 14:51:30 -0400 |
commit | 3ffb8938ed4008b463cd618ab9f0e97b5d51f428 (patch) | |
tree | 194a7bca8f5e8f33d5f1d8c8efae63030d8c40e5 | |
parent | 069691356e26d5f5a3668912aab1585535de4593 (diff) |
Make default vars overridable from configfile and at commandline.
-rwxr-xr-x | localbackupiceweaselprofile | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/localbackupiceweaselprofile b/localbackupiceweaselprofile index 480f920..2aa484e 100755 --- a/localbackupiceweaselprofile +++ b/localbackupiceweaselprofile @@ -4,10 +4,15 @@ set -e # Based on script by Micah Anderson <micah@riseup.net> -MOZDIR="${HOME}/.mozilla/firefox" +CFGFILE="{CFGFILE:-${HOME}/.backupiceweaselprofile}" +if -f "$CFGFILE"; then + . "$CFGFILE" +fi + +MOZDIR="${MOZDIR:-${HOME}/.mozilla/firefox}" # Change this to match your correct profile -PROFILE="8xrm3et5.default" +PROFILE="${PROFILE:-8xrm3et5.default}" if test -z "$(mount | grep -F "${MOZDIR}/${PROFILE}" )"; then mount "${MOZDIR}/${PROFILE}" |