Merge branch 'master' into newmc
authorMarius Gavrilescu <marius@ieval.ro>
Wed, 22 Apr 2015 07:24:09 +0000 (10:24 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Wed, 22 Apr 2015 07:24:09 +0000 (10:24 +0300)
Conflicts:
make_static.PL

Makefile.PL
make_static.PL

index b66d4833f49d7a90d52873e4ea6e8e2cf0476614..a1698a17c2b3b70366fc737fd16f8e10a86a4689 100644 (file)
@@ -32,6 +32,7 @@ WriteMakefile(
                   warnings    0
 
                   File::Slurp                      0
+                  File::Which                      0
                   Gruntmaster::Data                0
                   HTML::Element::Library           0
                   HTML::TreeBuilder                0
index 24e56a8bfcb67c370dc26cc84e26043a49ad90fc..06c9eeea791cd9e8da281f4d43fbb576d1398c4e 100644 (file)
@@ -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 {
This page took 0.011202 seconds and 4 git commands to generate.