[pacman-dev] [PATCH v2 1/1] add option to optimize PNG images with optipng

Dave Reisner d at falconindy.com
Sat Jan 24 21:26:12 UTC 2015


On Jan 24, 2015 3:58 PM, "Christian Hesse" <list at eworm.de> wrote:
>
> Dave Reisner <d at falconindy.com> on Sat, 2015/01/24 15:38:
> > > +                       if [[ $(file --brief --mime-type "$png") =
> > > 'image/png' ]]; then
> > > +                               optipng $OPTIPNGFLAGS "$png"
&>/dev/null
> > > ||
> > > +                                       warning "$(gettext "Could not
> > > optimize PNG image : %s")" "${png/$pkgdir\//}"
> >
> > I really dislike that we're using a simple var instead of an array
here. Is
> > there a strong reason not to do this?
>
> So you would prefer "${OPTIPNGFLAGS[@]}"? Again, this is adopted from upx
and
> UPXFLAGS which is just a simple var.
>
> I am fine with using an array, in fact I would prefer it. Want a new
patch?
> How about UPXFLAGS? Do we want to change it there?

I'd certainly prefer that but I don't know how others feel about breaking
backwards compatibility.

> --
> 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);}


More information about the pacman-dev mailing list