From 16525a1c8a6622b1665e67e4d8977c652a384be3 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Mon, 9 Aug 2010 15:19:43 -0400 Subject: Exit with hinting error if profile missing. --- localbackupiceweaselprofile | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'localbackupiceweaselprofile') diff --git a/localbackupiceweaselprofile b/localbackupiceweaselprofile index 2aa484e..78a6d6c 100755 --- a/localbackupiceweaselprofile +++ b/localbackupiceweaselprofile @@ -14,6 +14,14 @@ MOZDIR="${MOZDIR:-${HOME}/.mozilla/firefox}" # Change this to match your correct profile PROFILE="${PROFILE:-8xrm3et5.default}" +exit1() { + response="${1:+Error: }${1:-Internal error!}" + echo >&2 "$response" + exit 1 +} + +[ -d "${MOZDIR}/${PROFILE}" || exit1 "Profile $PROFILE missing. Perhaps set PROFILE in $CFGFILE" + if test -z "$(mount | grep -F "${MOZDIR}/${PROFILE}" )"; then mount "${MOZDIR}/${PROFILE}" fi -- cgit v1.2.3