Received: by mail.netbsd.org (Postfix, from userid 605) id 0F15884D8B; Fri, 19 Apr 2019 09:28:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 88C5E84D88 for ; Fri, 19 Apr 2019 09:28:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id TmQ9VS855oRM for ; Fri, 19 Apr 2019 09:28:46 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id DE60084D44 for ; Fri, 19 Apr 2019 09:28:45 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id D9602FB16; Fri, 19 Apr 2019 09:28:45 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1555666125160970" MIME-Version: 1.0 Date: Fri, 19 Apr 2019 09:28:45 +0000 From: "Nia Alarie" Subject: CVS commit: pkgsrc/games/powder-toy To: pkgsrc-changes@NetBSD.org Reply-To: nia@netbsd.org X-Mailer: log_accum Message-Id: <20190419092845.D9602FB16@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1555666125160970 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" 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. --_----------=_1555666125160970 Content-Disposition: inline Content-Length: 1325 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii 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" "$@" --_----------=_1555666125160970--