Re: [PATCH] t0300-credentials: Word around a solaris /bin/sh bug

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

 



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.

> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]