aboutsummaryrefslogtreecommitdiff
path: root/games/xyzzy.sh
diff options
context:
space:
mode:
Diffstat (limited to 'games/xyzzy.sh')
-rw-r--r--games/xyzzy.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/games/xyzzy.sh b/games/xyzzy.sh
index 5cc03278..b4fc4695 100644
--- a/games/xyzzy.sh
+++ b/games/xyzzy.sh
@@ -1,6 +1,8 @@
# ADVENTURE
-if [ -e "$HOME"/.xyzzy ] ; then
+state=${XDG_CONFIG_HOME:-$HOME/.config}/xyzzy/dest
+mkdir -p -- "${state%/*}"
+if [ -e "$state" ] ; then
printf >&2 '%s\n' 'Nothing happens.'
exit 1
fi
-printf '%s\n' 'I see no cave here.' > "$HOME"/.xyzzy
+printf '%s\n' 'I see no cave here.' > "$state"