Back up prefs.js to prefsjs_backups directory (#1514)

This commit is contained in:
xfzv 2022-07-30 12:22:32 +00:00 committed by GitHub
parent 996881aef1
commit ded7c01a08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,7 +69,8 @@ fStart() {
fi fi
fFF_check fFF_check
bakfile="prefs.js.backup.$(date +"%Y-%m-%d_%H%M")" mkdir -p prefsjs_backups
bakfile="prefsjs_backups/prefs.js.backup.$(date +"%Y-%m-%d_%H%M")"
mv prefs.js "${bakfile}" || fQuit 1 "Operation aborted.\nReason: Could not create backup file $bakfile" mv prefs.js "${bakfile}" || fQuit 1 "Operation aborted.\nReason: Could not create backup file $bakfile"
echo -e "\nprefs.js backed up: $bakfile" echo -e "\nprefs.js backed up: $bakfile"
echo "Cleaning prefs.js..." echo "Cleaning prefs.js..."