On Fri, Jun 29, 2007, Mark Hatle wrote:
> Any objections to the attached change?
> [...]
>
> -ARGS="`echo $* |\
> +# We iterate over the argument list. Processing the arguments using
> +# echo "$*" can fail with the sed chopping out parts of unrelated
> +# arguments
> +set - "$@" eoa_marker
> +while [ "$1" != "eoa_marker" ]; do
> + ARG="`echo "$1" | \
> sed -e 's% [^ ]*CFLAGS=[^ ]*%%' \
> -e 's% [^ ]*CC=[^ ]*ccache [^ ]*%%' \
> -e 's% [^ ]*CC=[^ ]*%%' \
> @@ -24,6 +29,11 @@
> -e 's%--with-db-mutex%%' \
> -e 's%--without-db-mutex%%' \
> `"
> + shift
> + set - "$@" "$ARG"
> +done
> +shift
I think the nested quoted make a portability trouble. But luckily they
are actually not needed as the result of backticks can be portably
assigned to a variable without extra quotes. So please just use
ARG=`echo "$1" | sed [...]`
But beside this it looks fine. Go for it!
Ralf S. Engelschall
rse@engelschall.com
www.engelschall.com
Received on Sat Jun 30 00:12:41 2007