[PATCH] gen_build_files.sh: Remove bashisms

Denys Vlasenko vda.linux at googlemail.com
Mon May 17 20:49:57 UTC 2010


On Monday 17 May 2010 22:10, Douglas Mencken wrote:
> Patches welcome? Here's mine.
> License: Public domain.

> -		while read -r; do
> -			test x"$REPLY" = x"INSERT" && REPLY="$s"
> -			printf "%s\n" "$REPLY"
> +		while read -r reply; do
> +			test x"$reply" = x"INSERT" && reply="$s"
> +			printf "%s\n" "$reply"
>  		done <"$src" >>"$dst.$$.tmp"
> 
>  		if test -f "$dst" && cmp -s "$dst.$$.tmp" "$dst"; then
> 
> (also attached)
> It's easy, isn't it? ;)

Easy and wrong. It eats leading and trailing whitespace.
-- 
vda



More information about the busybox mailing list