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  <br...@clisp.org>
>
>       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