Patchwork PATCH: do not rely on "tempfile" being available

login
register
about
Submitter Bernie Innocenti
Date 2009-09-02 20:12:21
Message ID <1251922341.1487.57.camel@giskard>
Download mbox | patch
Permalink /patch/241/
State Accepted
Headers show

Comments

Bernie Innocenti - 2009-09-02 20:12:21
Signed-off-by: Bernie Innocenti <bernie@codewiz.org>

Build fix: add a fallback for systems where tempfile is missing
Ward Vandewege - 2009-09-02 21:42:32
On Wed, Sep 02, 2009 at 04:12:21PM -0400, Bernie Innocenti wrote:
> Signed-off-by: Bernie Innocenti <bernie@codewiz.org>
> 
> Build fix: add a fallback for systems where tempfile is missing

Acked-by: Ward Vandewege <ward@gnu.org>

Committed in r271.

Thanks,
Ward.

Patch

Index: bin/show-instructions.sh
===================================================================
--- bin/show-instructions.sh	(revision 261)
+++ bin/show-instructions.sh	(working copy)
@@ -1,6 +1,6 @@ 
 #!/bin/sh
 
-tmp=`tempfile`
+tmp=`tempfile 2>/dev/null || echo /tmp/show-instructions.$$`
 cat $1 | sed -e "s:%DESTFILE%:$2:" > $tmp
 
 if [ -x `dirname $0`/../scripts/kconfig/lxdialog/lxdialog ]; then