From 3ffb8938ed4008b463cd618ab9f0e97b5d51f428 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Mon, 9 Aug 2010 14:49:59 -0400 Subject: Make default vars overridable from configfile and at commandline. --- localbackupiceweaselprofile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'localbackupiceweaselprofile') 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 -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}" -- cgit v1.2.3