pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

cannonball: Add XDG_DATA_HOME check for creating directories. Suggested by nia@



Module Name:	pkgsrc-wip
Committed By:	Santhosh Raju <fox%NetBSD.org@localhost>
Pushed By:	fox
Date:		Sun Jun 9 19:37:12 2019 -0500
Changeset:	e488f284f1b4eea7dc1d6ca57caaa34fa8ab4db3

Modified Files:
	cannonball/files/cannonball.sh.in

Log Message:
cannonball: Add XDG_DATA_HOME check for creating directories. Suggested by nia@

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=e488f284f1b4eea7dc1d6ca57caaa34fa8ab4db3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 cannonball/files/cannonball.sh.in | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diffs:
diff --git a/cannonball/files/cannonball.sh.in b/cannonball/files/cannonball.sh.in
index 43cdddca9a..ea4d915d07 100644
--- a/cannonball/files/cannonball.sh.in
+++ b/cannonball/files/cannonball.sh.in
@@ -1,6 +1,11 @@
 #!/bin/sh
 
-CANNONBALL_DIR=${HOME}/.local/share/cannonball
+if [ -n "${XDG_DATA_HOME}" ]; then
+	CANNONBALL_DIR=${XDG_DATA_HOME}/cannonball
+else
+	CANNONBALL_DIR=${HOME}/.local/share/cannonball
+fi
+
 RESOURCE_DIR=${CANNONBALL_DIR}/res
 ROMS_DIR=${CANNONBALL_DIR}/roms
 
@@ -19,5 +24,4 @@ if [ ! -d "${RESOURCE_DIR}" ]; then
        "${RESOURCE_DIR}"
 fi
 
-
 cd "${CANNONBALL_DIR}" && exec "@PREFIX@/libexec/cannonball" "$@"


Home | Main Index | Thread Index | Old Index