- check4progs mutt || echo "Warning, mutt not available for mail handling.">&2
- check4progs findchanged tar || { echo "Sorry, can't continue. Exiting.">&2 ; exit 1 }
+ if [ -d /live/overlay ] ; then
+ CHANGE_DIR='/live/overlay'
+ elif [ -d /live/image ] ; then # old version
+ CHANGE_DIR='/live/image'
+ else
+ echo "Error: no overlay directories found (neither /live/overlay nor /live/image)." >&2
+ bailout; exit 1
+ fi
+
+ if [ -d /live/rofs ] ; then
+ ORIG_DIR="$(find /live/rofs/ -maxdepth 1 -name \*.squashfs | head -1)"
+ else # old version
+ ORIG_DIR="/GRML"
+ fi
+
+ check4progs mutt &>/dev/null || echo "Warning, mutt not available for mail handling.">&2
+ check4progs tar || { echo "Sorry, can't continue. Exiting.">&2 ; bailout ; exit 1 }