pkgsrc-Changes archive

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

CVS commit: pkgsrc/games/powder-toy



Module Name:    pkgsrc
Committed By:   nia
Date:           Fri Apr 19 09:28:45 UTC 2019

Modified Files:
        pkgsrc/games/powder-toy: Makefile
        pkgsrc/games/powder-toy/files: powder-toy.sh.in

Log Message:
powder-toy: harden the initialization script, avoiding sh -e and quoting
more.

advice from kre, thanks.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 pkgsrc/games/powder-toy/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/games/powder-toy/files/powder-toy.sh.in

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

Modified files:

Index: pkgsrc/games/powder-toy/Makefile
diff -u pkgsrc/games/powder-toy/Makefile:1.1 pkgsrc/games/powder-toy/Makefile:1.2
--- pkgsrc/games/powder-toy/Makefile:1.1        Sat Apr 13 12:08:04 2019
+++ pkgsrc/games/powder-toy/Makefile    Fri Apr 19 09:28:45 2019
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.1 2019/04/13 12:08:04 nia Exp $
+# $NetBSD: Makefile,v 1.2 2019/04/19 09:28:45 nia Exp $
 
 DISTNAME=      powder-toy-94.1
+PKGREVISION=   1
 CATEGORIES=    games
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=ThePowderToy/}
 GITHUB_PROJECT=        The-Powder-Toy

Index: pkgsrc/games/powder-toy/files/powder-toy.sh.in
diff -u pkgsrc/games/powder-toy/files/powder-toy.sh.in:1.1 pkgsrc/games/powder-toy/files/powder-toy.sh.in:1.2
--- pkgsrc/games/powder-toy/files/powder-toy.sh.in:1.1  Sat Apr 13 12:31:17 2019
+++ pkgsrc/games/powder-toy/files/powder-toy.sh.in      Fri Apr 19 09:28:45 2019
@@ -1,9 +1,7 @@
-#!/bin/sh -e
-if [ ${XDG_DATA_HOME} ]; then
-       mkdir -p ${XDG_DATA_HOME}/powder-toy
-       cd ${XDG_DATA_HOME}/powder-toy
+#!/bin/sh
+if [ -n "${XDG_DATA_HOME}" ]; then
+       DIR=${XDG_DATA_HOME}/powder-toy
 else
-       mkdir -p ${HOME}/.local/share/powder-toy
-       cd ${HOME}/.local/share/powder-toy
+       DIR=${HOME}/.local/share/powder-toy
 fi
-exec @PREFIX@/libexec/powder-toy "$@"
+mkdir -p "${DIR}" && cd "${DIR}" && exec "@PREFIX@/libexec/powder-toy" "$@"



Home | Main Index | Thread Index | Old Index