From: Christoph Berg Date: Wed, 31 Aug 2016 10:01:28 +0000 (+0200) Subject: Minor fixes to the updt_embedded_rsc mechanism X-Git-Tag: v9.0~9^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8c1f30e996cb200abd10cc548a5e9fb0845a86f2;p=pgbadger Minor fixes to the updt_embedded_rsc mechanism Don't add a new newline before __DATA__ (and remove the newlines accumulated so far); create resources/min/ for temporary files (and add it to .gitignore); fix a typo. --- diff --git a/pgbadger b/pgbadger index 593508f..4e64d4b 100644 --- a/pgbadger +++ b/pgbadger @@ -14665,21 +14665,6 @@ sub localdie exit 1; } - - - - - - - - - - - - - - - __DATA__ WRFILE: jquery.jqplot.min.css diff --git a/resources/.gitignore b/resources/.gitignore new file mode 100644 index 0000000..4844d17 --- /dev/null +++ b/resources/.gitignore @@ -0,0 +1 @@ +min/ diff --git a/resources/README b/resources/README index c7076ee..dffb7f0 100644 --- a/resources/README +++ b/resources/README @@ -1,4 +1,4 @@ -Ressources files are collected from their respective download places as follow: +Resources files are collected from their respective download places as follow: jqPlot: ------- diff --git a/tools/updt_embedded_rsc.pl b/tools/updt_embedded_rsc.pl index 5a68c3f..4452465 100644 --- a/tools/updt_embedded_rsc.pl +++ b/tools/updt_embedded_rsc.pl @@ -31,6 +31,7 @@ if (!-d $RSC_DIR) { `patch -r - -s -N resources/jquery.jqplot.js -i resources/patch-jquery.jqplot.js`; # Generate all minified resources files +mkdir "$RSC_DIR/min"; foreach my $f (@rsc_list) { my $dest = $f; $dest =~ s/\.(js|css)$/.min.$1/; @@ -72,7 +73,7 @@ close(IN); # Write script base to destination file open(OUT, ">$DEST_TMP_FILE") or die "FATAL: can't write to file $DEST_TMP_FILE, $!\n"; print OUT $content; -print OUT "\n__DATA__\n"; +print OUT "__DATA__\n"; # Append each minified resources file foreach my $f (@min_rsc_list) {