aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2020-05-18 17:33:02 +1200
committerTom Ryder <tom@sanctum.geek.nz>2020-05-18 17:33:02 +1200
commitae31d2fd097db16f0a2d78de6f08ffaf21825e4a (patch)
tree54550d3c94345e76f5d3c0569a9067e941c36d1a /games
parentMove wget config into XDG (diff)
downloaddotfiles-ae31d2fd097db16f0a2d78de6f08ffaf21825e4a.tar.gz
dotfiles-ae31d2fd097db16f0a2d78de6f08ffaf21825e4a.zip
Apply XDG to xyzzy(6df)
Diffstat (limited to 'games')
-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"