summaryrefslogtreecommitdiff
path: root/localbackupiceweaselprofile
diff options
context:
space:
mode:
Diffstat (limited to 'localbackupiceweaselprofile')
-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