if [ "$FOLDER_PATH" = "" ] ; then BKDIR="$(pwd)/BACKUPS"
else BKDIR="$FOLDER_PATH/BACKUPS"; fi
echo "This script will archive the entire Psion 'Internal' drive to a zip file."
echo "If the file already exists it will only be updated with newer items."
echo "The file Internal.zip will be in folder $BKDIR."
echo
echo "    Make sure PsiONtrack is running and connected first,"
echo "    AND that you have closed all open apps on the Psion!"
echo

if [ "$FOLDER_PATH" != "" ] ; then
echo "type <Enter> to continue. Click the Close gadget to abort."
else
echo "type <Enter> to continue. <ctrl-C> to abort."
fi
read
cd /mnt/psion
[ -e  "$BKDIR" ] || mkdir "$BKDIR";
if [ -e  "$BKDIR/Internal.zip" ] ; then
 zip -r -u  "$BKDIR/Internal" Internal
else
 zip -r  "$BKDIR/Internal" Internal
fi
echo "===================== Done =========================="
if [ "$FOLDER_PATH" != "" ] ; then read; fi
