From: Marius Gavrilescu Date: Wed, 22 Apr 2015 07:24:09 +0000 (+0300) Subject: Merge branch 'master' into newmc X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=6f5debb62f9d49098b660b626890a46dbbf7346f;hp=cf39f49f7a89076dc1fc67a9224d7546bf27a1a3;p=gruntmaster-page.git Merge branch 'master' into newmc Conflicts: make_static.PL --- diff --git a/Makefile.PL b/Makefile.PL index b66d483..a1698a1 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -32,6 +32,7 @@ WriteMakefile( warnings 0 File::Slurp 0 + File::Which 0 Gruntmaster::Data 0 HTML::Element::Library 0 HTML::TreeBuilder 0 diff --git a/make_static.PL b/make_static.PL index 24e56a8..06c9eee 100644 --- a/make_static.PL +++ b/make_static.PL @@ -7,6 +7,7 @@ use Digest::SHA qw/sha256_base64/; use IO::Compress::Gzip qw/gzip/; use File::Slurp qw/read_file write_file edit_file_lines/; use SVG::SpriteMaker; +use File::Which; use List::Util qw/first/; mkdir 'static'; @@ -16,7 +17,9 @@ mkdir 'static/logos'; sub gzip_file { my ($file) = @_; - gzip $file => "$file.gz", -Level => 9, Minimal => 1; + my $zopfli = which 'zopfli'; + system $zopfli => $file if $zopfli; + gzip $file => "$file.gz", -Level => 9, Minimal => 1 unless $zopfli; } sub write_gzfile {