sav fixes
This commit is contained in:
parent
12c37b5fa9
commit
1850737cf6
20 changed files with 3729 additions and 3738 deletions
29
tools/nuke_love_saves.sh
Executable file
29
tools/nuke_love_saves.sh
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
#!/usr/bin/env sh
|
||||
# Delete Chroma Solstice's *runtime* LÖVE save data. Project levels in
|
||||
# ./rooms are not affected.
|
||||
set -eu
|
||||
|
||||
DATA_HOME=${XDG_DATA_HOME:-"$HOME/.local/share"}
|
||||
SAVE_DIR="$DATA_HOME/love/chroma-solstice"
|
||||
|
||||
if [ "${1:-}" != "--yes" ]; then
|
||||
printf '%s\n' "This deletes only the local LÖVE runtime saves at:"
|
||||
printf '%s\n' " $SAVE_DIR"
|
||||
printf '%s\n' "Repository files, including ./rooms/*.sav, are not touched."
|
||||
printf '%s\n' "Run: $0 --yes"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -e "$SAVE_DIR" ]; then
|
||||
printf '%s\n' "No local LÖVE saves found at: $SAVE_DIR"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Keep the destructive target exact even if this script is changed later.
|
||||
case "$SAVE_DIR" in
|
||||
"$DATA_HOME/love/chroma-solstice") ;;
|
||||
*) printf '%s\n' "Refusing unexpected save path: $SAVE_DIR" >&2; exit 2 ;;
|
||||
esac
|
||||
|
||||
rm -rf -- "$SAVE_DIR"
|
||||
printf '%s\n' "Deleted local LÖVE saves: $SAVE_DIR"
|
||||
Loading…
Add table
Add a link
Reference in a new issue