bug-gnulib
[Top][All Lists]
Advanced

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

Re: mktemp: not found


From: Jim Meyering
Subject: Re: mktemp: not found
Date: Sun, 04 Dec 2011 20:57:17 +0100

Bruno Haible wrote:
> On Minix 3.1.8, I get this spurious output from the test-verify.sh test:
>
>   mktemp: not found
>   PASS: test-verify.sh
>
> This patch fixes it. OK to apply?
>
> 2011-12-04  Bruno Haible  <address@hidden>
>
>       tests: Avoid spurious error message on platforms without mktemp program.
>       * tests/init.sh (mktempd_): Run mktemp in a subshell.
>
> --- tests/init.sh.orig        Sun Dec  4 14:55:00 2011
> +++ tests/init.sh     Sun Dec  4 14:54:51 2011
> @@ -521,7 +521,7 @@
>    esac
>
>    # First, try to use mktemp.
> -  d=`unset TMPDIR; mktemp -d -t -p "$destdir_" "$template_" 2>/dev/null` \
> +  d=`unset TMPDIR; (mktemp -d -t -p "$destdir_" "$template_") 2>/dev/null` \

Thanks.  That would avoid the spurious output.
How about using { ...; } instead?

  d=`unset TMPDIR; { mktemp -d -t -p "$destdir_" "$template_"; } 2>/dev/null` \

That should do the same without the cost of a sub-shell.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]