#!/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"