aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2020-05-18 23:11:54 +1200
committerTom Ryder <tom@sanctum.geek.nz>2020-05-18 23:11:54 +1200
commitb39c6f9a595bf1ea40fe7ceafb3658528a9265b9 (patch)
tree70af41d3b3cf20b51e851f9ee03b77c82fe9e09d /games
parentMerge branch 'release/v9.1.0' (diff)
parentBump VERSION (diff)
downloaddotfiles-b39c6f9a595bf1ea40fe7ceafb3658528a9265b9.tar.gz
dotfiles-b39c6f9a595bf1ea40fe7ceafb3658528a9265b9.zip
Merge branch 'release/v9.2.0'v9.2.0
* release/v9.2.0: Install bin/han as part of Bash target Clean up xyzzy(6df) a bit Apply XDG to xyzzy(6df) Move wget config into XDG Save wget HSTS cache in XDG_CACHE_HOME
Diffstat (limited to 'games')
-rw-r--r--games/xyzzy.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/games/xyzzy.sh b/games/xyzzy.sh
index 5cc03278..ebf3959a 100644
--- a/games/xyzzy.sh
+++ b/games/xyzzy.sh
@@ -1,6 +1,11 @@
# ADVENTURE
-if [ -e "$HOME"/.xyzzy ] ; then
- printf >&2 '%s\n' 'Nothing happens.'
- exit 1
+dir=${XDG_CONFIG_HOME:-$HOME/.config}/xyzzy
+if ! [ -d "$dir" ] ; then
+ mkdir -- "$dir" || exit
fi
-printf '%s\n' 'I see no cave here.' > "$HOME"/.xyzzy
+if [ -e "$dir"/dest ] ; then
+ printf >&2 'Nothing happens.\n'
+else
+ printf 'I see no cave here.\n' > "$dir"/dest
+fi
+exit 1