Tom de Vries <tom_devr...@mentor.com> writes:

> diff --git a/contrib/check_GNU_style.sh b/contrib/check_GNU_style.sh
> index 728c11a..ab59b1e 100755
> --- a/contrib/check_GNU_style.sh
> +++ b/contrib/check_GNU_style.sh
> @@ -84,10 +84,16 @@ grep $format '^+' $files \
>  g (){
>      local msg="$1"
>      local arg="$2"
> +
> +    local found=false
>      cat $inp \
>       | egrep --color=always -- "$arg" \
> -     > $tmp && printf "\n$msg\n"
> -    cat $tmp
> +     > "$tmp" && found=true
> +
> +    if $found; then

   cat $inp \
    | egrep --color=always -- "$arg" \
    > $tmp && {
      printf "\n$msg\n"
      cat $tmp
    }

Andreas.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

Reply via email to