git://git.exim.org
/
exim-website.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Missing whitespace in the copyright declaration
[exim-website.git]
/
script
/
gen.pl
diff --git
a/script/gen.pl
b/script/gen.pl
index a0a15b03bbab185202ff4ec897863c4bce8ed5c8..3c1137bce534eee1fa487179a576bddfb0cf2023 100755
(executable)
--- a/
script/gen.pl
+++ b/
script/gen.pl
@@
-3,7
+3,7
@@
use strict;
use warnings;
use strict;
use warnings;
-use CSS::Minifier::XS;
+use CSS::Minifier::XS
0.07
;
use File::Copy;
use File::Find;
use File::Slurp;
use File::Copy;
use File::Find;
use File::Slurp;
@@
-62,9
+62,7
@@
sub do_web {
if ( $path =~ /(.+)\.css$/ ) {
print "CSS to : docroot:/$path\n";
my $content = read_file("$opt{tmpl}/web/$path");
if ( $path =~ /(.+)\.css$/ ) {
print "CSS to : docroot:/$path\n";
my $content = read_file("$opt{tmpl}/web/$path");
- my $output = $opt{minify} ? CSS::Minifier::XS::minify($content) : $content;
- $output =~ s/and\(/and (/g; # hack round minify bug
- write_file( "$opt{docroot}/$path", $output );
+ write_file( "$opt{docroot}/$path", $opt{minify} ? CSS::Minifier::XS::minify($content) : $content );
}
elsif ( $path =~ /(.+)\.js$/ ) {
print "JS to : docroot:/$path\n";
}
elsif ( $path =~ /(.+)\.js$/ ) {
print "JS to : docroot:/$path\n";
@@
-315,7
+313,7
@@
sub transform {
mkdirp( ( $out_path =~ /^(.+)\/.+$/ )[0] );
## Write out the document
mkdirp( ( $out_path =~ /^(.+)\/.+$/ )[0] );
## Write out the document
- open my $out, '>', $out_path or die
$!
;
+ open my $out, '>', $out_path or die
"Unable to write $out_path - $!"
;
print $out $stylesheet->output_as_bytes($doc);
close $out;
}
print $out $stylesheet->output_as_bytes($doc);
close $out;
}