Allan McRae <[email protected]> on Sat, 2015/01/24 16:17: > On 24/01/15 00:40, Florian Pritz wrote: > > 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.
Agreed.
> hrm... is there a reason why we don't use this elsewhere in makepkg?
My code is based on the upx functionality. So we want to change it there as
well?
> >> + optipng "$png" &>/dev/null ||
>
> Do this:
>
> optipng $OPTIPNGFLAGS "$png" &>/dev/null ||
>
> then people can specify options they want to pass to optipng - see the
> upx option.
Sounds reasonable. I will prepare a new patch.
> >> + warning "$(gettext "Could not
> >> optimize PNG image : %s")" "${png/$pkgdir\//}"
> >> + fi
> >> + done
> >> + fi
> >> }
> >>
> >> find_libdepends() {
> >
> >
--
main(a){char*c=/* Schoene Gruesse */"B?IJj;MEH"
"CX:;",b;for(a/* Chris get my mail address: */=0;b=c[a++];)
putchar(b-1/(/* gcc -o sig sig.c && ./sig */b/42*2-3)*42);}
pgplObP_sQjdh.pgp
Description: OpenPGP digital signature
