Merge branch 'master' into newmc
[gruntmaster-page.git] / make_static.PL
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.009475 seconds and 4 git commands to generate.