On Sunday 30 September 2012 17:44:05 Gilles Dartiguelongue wrote:
> +# @USAGE: gnome2_disable_deprecation_warning

no need for this

> +     for makefile in $(find "${S}" -name "Makefile.in" \
> +             -o -name "Makefile.am" -o -name "Makefile.decl" | sort); do

`local makefile` missing.  also, this does not preserve quoting.  you would 
have to do:
        while read makefile ; do
                ...
        done < <(find ...)

> +             if ! grep -qE "(DISABLE_DEPRECATED|GSEAL_ENABLE)" 
> "${makefile}"; then

`grep -E` -> `egrep`

> +             LC_ALL=C sed -e 's:-D[A-Z_]\+_DISABLE_DEPRECATED:$(NULL):g' \
> +                     -e 's:-DGSEAL_ENABLE:$(NULL):g' \
> +                     -i "${makefile}"

use -r instead of escaping.  it's also more readable to split -e from the rest 
since that tends to be the meat of sed.
        LC_ALL=C sed -i -r \
                -e '...' \
                -e '...' \
                "${makefile}"

> +                     fails[$(( ${#fails[@]} + 1 ))]="${makefile}"

fails+=( "${makefile}" )

> +             eerror "Failed to disable deprecation warnings in $makefile"

${makefile}

also, if you're using eerror, this really should end in a `die`.  or it should 
use ewarn.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to