summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2010-08-09 15:19:43 -0400
committerJonas Smedegaard <dr@jones.dk>2010-08-09 15:19:43 -0400
commit16525a1c8a6622b1665e67e4d8977c652a384be3 (patch)
treeb828dadab40cfe08dd66f57f1bdafcdb2b8b4a5e
parent3ffb8938ed4008b463cd618ab9f0e97b5d51f428 (diff)
Exit with hinting error if profile missing.
-rwxr-xr-xlocalbackupiceweaselprofile8
1 files changed, 8 insertions, 0 deletions
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