pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
sauerbraten: handle configuration properly
Module Name: pkgsrc-wip
Committed By: nia <nia%netbsd.org@localhost>
Pushed By: nee
Date: Thu Jun 27 23:54:08 2019 +0100
Changeset: b4124a19417f448ce024b6904827aff35aaf4e8f
Modified Files:
sauerbraten/files/sauerbraten.sh.in
Log Message:
sauerbraten: handle configuration properly
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=b4124a19417f448ce024b6904827aff35aaf4e8f
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
sauerbraten/files/sauerbraten.sh.in | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diffs:
diff --git a/sauerbraten/files/sauerbraten.sh.in b/sauerbraten/files/sauerbraten.sh.in
index 21da8beaea..af8317af27 100644
--- a/sauerbraten/files/sauerbraten.sh.in
+++ b/sauerbraten/files/sauerbraten.sh.in
@@ -1,2 +1,9 @@
#!/bin/sh
-cd "@PREFIX@/share/sauerbraten" && exec "@PREFIX@/libexec/${0##*/}" "$@"
+if [ -n "${XDG_CONFIG_HOME}" ]; then
+ DIR="${XDG_CONFIG_HOME}/sauerbraten"
+else
+ DIR="${HOME}/.config/sauerbraten"
+fi
+mkdir -p "${DIR}" && \
+ cd "@PREFIX@/share/sauerbraten" && \
+ exec "@PREFIX@/libexec/${0##*/}" "-q${DIR}" "$@"
Home |
Main Index |
Thread Index |
Old Index