[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] bootstrap: use a more consistent error reporting scheme.
From: |
Stefano Lattarini |
Subject: |
Re: [PATCH] bootstrap: use a more consistent error reporting scheme. |
Date: |
Fri, 06 Jul 2012 15:21:21 +0200 |
On 07/06/2012 03:11 PM, Akim Demaille wrote:
>
> --- a/build-aux/bootstrap
> +++ b/build-aux/bootstrap
> @@ -1,6 +1,6 @@
> #! /bin/sh
> # Print a version string.
> -scriptversion=2012-07-06.11; # UTC
> +scriptversion=2012-07-06.13; # UTC
>
> # Bootstrap this package from checked-out sources.
>
> @@ -77,15 +77,26 @@ Running without arguments will suffice in most cases.
> EOF
> }
>
> -warn()
> +# warnf_ FORMAT-STRING ARG1...
> +warnf_ ()
> {
> - for i
> - do
> - echo "$i"
> - done | sed -e "s/^/$me: /" >&2
> + warnf_format_=$1
> + shift
> + printf "$warnf_format_" "$@" | sed "s,^,$me: ," >&2
>
Why not shave off the extra forks here?
printf "$me: $warnf_format_" "$@" >&2
This shouldn't cause problems, unless '$me' contains '%' or '\' characters.
And anyone naming a script to contain those characters deserves deserves to
suffer anyway ...
Regards,
Stefano
- Re: [PATCH] bootstrap: use a more consistent error reporting scheme., (continued)
- Re: [PATCH] bootstrap: use a more consistent error reporting scheme., Jim Meyering, 2012/07/10
- Re: [PATCH] bootstrap: use a more consistent error reporting scheme., Akim Demaille, 2012/07/10
- Re: [PATCH] bootstrap: use a more consistent error reporting scheme., Jim Meyering, 2012/07/10
- Re: [PATCH] bootstrap: use a more consistent error reporting scheme., Akim Demaille, 2012/07/10
- Re: [PATCH] bootstrap: use a more consistent error reporting scheme., Jim Meyering, 2012/07/10
- Re: [PATCH] bootstrap: use a more consistent error reporting scheme., Akim Demaille, 2012/07/10
- Re: [PATCH] bootstrap: use a more consistent error reporting scheme., Jim Meyering, 2012/07/10
- Re: [PATCH] bootstrap: use a more consistent error reporting scheme., Akim Demaille, 2012/07/06
- Re: [PATCH] bootstrap: use a more consistent error reporting scheme.,
Stefano Lattarini <=
- Re: [PATCH] bootstrap: use a more consistent error reporting scheme., Akim Demaille, 2012/07/06
- Re: [PATCH] bootstrap: use a more consistent error reporting scheme., Stefano Lattarini, 2012/07/06
- Re: [PATCH] bootstrap: use a more consistent error reporting scheme., Akim Demaille, 2012/07/06
- Re: [PATCH] bootstrap: use a more consistent error reporting scheme., Jim Meyering, 2012/07/06
- Re: [PATCH] bootstrap: use a more consistent error reporting scheme., Paul Eggert, 2012/07/06
- Re: [PATCH] bootstrap: use a more consistent error reporting scheme., Akim Demaille, 2012/07/06
- Re: [PATCH] bootstrap: use a more consistent error reporting scheme., Jim Meyering, 2012/07/06
- Re: [PATCH] bootstrap: use a more consistent error reporting scheme., Thien-Thi Nguyen, 2012/07/06
- Re: [PATCH] bootstrap: use a more consistent error reporting scheme., Jim Meyering, 2012/07/06
- Re: [PATCH] bootstrap: use a more consistent error reporting scheme., Thien-Thi Nguyen, 2012/07/06