On 22.01.2015 09:36, Christian Hesse wrote:
> --- a/scripts/makepkg.sh.in
> +++ b/scripts/makepkg.sh.in
> @@ -1918,6 +1918,17 @@ tidy_install() {
>                       fi
>               done
>       fi
> +
> +     if check_option "optipng" "y"; then
> +             msg2 "$(gettext "Optimizing PNG images...")"
> +             local png
> +             find . -type f -iname "*.png" 2>/dev/null | while read -r png ; 
> do
> +                     if [[ $(file -bi "$png") = *'image/png'* ]]; then

Better use "file -b --mime-type" and get rid of the globs.

> +                             optipng "$png" &>/dev/null ||
> +                                     warning "$(gettext "Could not optimize 
> PNG image : %s")" "${png/$pkgdir\//}"
> +                     fi
> +             done
> +     fi
>  }
>  
>  find_libdepends() {


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to