Re: [PATCH] t0300-credentials: Word around a solaris /bin/sh bug
- From
Jeff King <peff@peff.net>
- Date
- Feb 3, 2012, 23:27 UTC
- Message-ID
- <20120203232755.GA11953@sigill.intra.peff.net>
- In-Reply-To
- <7vipjnmt8a.fsf@alter.siamese.dyndns.org>
On Fri, Feb 03, 2012 at 02:45:25PM -0800, Junio C Hamano wrote:
> Let's not over-engineer this and stick to the simple-stupid-sufficient.
Fair enough.
Show 10 quoted lines
> Something like this?
> [...]
> +# Prepare a script to be used in the test
> +write_script () {
> + {
> + echo "#!${2-"$SHELL_PATH"}"
> + cat
> + } >"$1" &&
> + chmod +x "$1"
> +}Looks good to me (it probably doesn't matter, but you may want to connect the echo and cat via &&).
-Peff