PyukiWiki CVS Commit
pyuki****@lists*****
2012年 1月 4日 (水) 03:49:12 JST
Index: PyukiWiki-Devel/build/Jcode-convert.pl diff -u PyukiWiki-Devel/build/Jcode-convert.pl:1.278 PyukiWiki-Devel/build/Jcode-convert.pl:1.279 --- PyukiWiki-Devel/build/Jcode-convert.pl:1.278 Wed Jan 4 02:18:05 2012 +++ PyukiWiki-Devel/build/Jcode-convert.pl Wed Jan 4 03:49:12 2012 @@ -1,12 +1,12 @@ #!/usr/bin/perl # release file perl script for pyukiwiki -# $Id: Jcode-convert.pl,v 1.278 2012/01/03 17:18:05 papu Exp $ +# $Id: Jcode-convert.pl,v 1.279 2012/01/03 18:49:12 papu Exp $ use Jcode; $code=$ARGV[0]; -$src=$ARGV[1]; -$dest=$ARGV[2]; +$src=$ARGV[2]; +$dest=$ARGV[1]; if(open(R,$src)) { foreach(<R>) { Index: PyukiWiki-Devel/build/build.mk diff -u PyukiWiki-Devel/build/build.mk:1.376 PyukiWiki-Devel/build/build.mk:1.377 --- PyukiWiki-Devel/build/build.mk:1.376 Wed Jan 4 02:18:05 2012 +++ PyukiWiki-Devel/build/build.mk Wed Jan 4 03:49:12 2012 @@ -1,5 +1,5 @@ # release file makefile for pyukiwiki -# $Id: build.mk,v 1.376 2012/01/03 17:18:05 papu Exp $ +# $Id: build.mk,v 1.377 2012/01/03 18:49:12 papu Exp $ all: @echo "PyukiWIki ${VERSION} Release Builder" Index: PyukiWiki-Devel/build/build.pl diff -u PyukiWiki-Devel/build/build.pl:1.392 PyukiWiki-Devel/build/build.pl:1.393 --- PyukiWiki-Devel/build/build.pl:1.392 Wed Jan 4 02:18:05 2012 +++ PyukiWiki-Devel/build/build.pl Wed Jan 4 03:49:12 2012 @@ -1,6 +1,6 @@ #!/usr/bin/perl # release file perl script for pyukiwiki -# $Id: build.pl,v 1.392 2012/01/03 17:18:05 papu Exp $ +# $Id: build.pl,v 1.393 2012/01/03 18:49:12 papu Exp $ $DIR=$ARGV[0]; $TYPE=$ARGV[1]; @@ -445,7 +445,8 @@ my($shell)=@_; open(PIPE,"$shell|"); foreach(<PIPE>) { - chomp; + print $_; +# chomp; } close(PIPE); } @@ -519,7 +520,7 @@ open(YUI,"/tmp/compressfile") || die; my $yui=""; foreach(<YUI>) { - $yui.=$_; + print $yui.=$_; } close(YUI); unlink("/tmp/compressfile"); Index: PyukiWiki-Devel/build/compactmagic.pl diff -u PyukiWiki-Devel/build/compactmagic.pl:1.286 PyukiWiki-Devel/build/compactmagic.pl:1.287 --- PyukiWiki-Devel/build/compactmagic.pl:1.286 Wed Jan 4 02:18:05 2012 +++ PyukiWiki-Devel/build/compactmagic.pl Wed Jan 4 03:49:12 2012 @@ -1,6 +1,6 @@ #!/usr/bin/perl # release file perl script for pyukiwiki -# $Id: compactmagic.pl,v 1.286 2012/01/03 17:18:05 papu Exp $ +# $Id: compactmagic.pl,v 1.287 2012/01/03 18:49:12 papu Exp $ $header="#----------------------------------------------------------------------\n"; print $header; Index: PyukiWiki-Devel/build/compressfile.pl diff -u PyukiWiki-Devel/build/compressfile.pl:1.249 PyukiWiki-Devel/build/compressfile.pl:1.250 --- PyukiWiki-Devel/build/compressfile.pl:1.249 Wed Jan 4 02:18:05 2012 +++ PyukiWiki-Devel/build/compressfile.pl Wed Jan 4 03:49:12 2012 @@ -1,12 +1,12 @@ -# yuicompressor scriopt -# $Id: compressfile.pl,v 1.249 2012/01/03 17:18:05 papu Exp $ - #!/usr/bin/perl +# yuicompressor script +# $Id: compressfile.pl,v 1.250 2012/01/03 18:49:12 papu Exp $ $mode=$ARGV[0]; $output=$ARGV[1]; $input=$ARGV[2]; $nohead=$ARGV[3]; +print "compress $input -> $output\n"; $compress{js}="yuicompressor --type js --charset utf8 -o"; $compress{css}="yuicompressor --type css --charset utf8 -o"; $convert{utf8}="perl ./build/Jcode-convert.pl utf8"; @@ -18,9 +18,27 @@ # . $top # if($mode eq "css"); } -&shell("$convert{utf8} $input $input.tmp"); +open(R,"$input"); +open(W,">$input.commentcut"); +my $buf; +foreach(<R>) { + $buf.= $_; +} +for(my $i=0; $i<=1; $i++) { + $buf=~s/\/\*(.|\n)+?\*\///g; +} +for(my $i=0; $i<=1; $i++) { +$buf=~s/^\/\/(.+)\n/\n/g; +$buf=~s/\n\/\/(.+)\n/\n/g; +} + +print W $buf; +close(W); +close(R); + +&shell("$convert{utf8} $input.tmp $input.commentcut"); &shell("$compress{$mode} $input.tmp2 $input.tmp"); -&shell("$convert{euc} $input.tmp2 $input.tmp"); +&shell("$convert{euc} $input.tmp $input.tmp2"); open(R,"$input.tmp"); open(W,">$output"); @@ -30,6 +48,7 @@ } close(W); close(R); +unlink("$input.commentcut"); unlink("$input.tmp"); unlink("$input.tmp2"); Index: PyukiWiki-Devel/build/lang.pl diff -u PyukiWiki-Devel/build/lang.pl:1.296 PyukiWiki-Devel/build/lang.pl:1.297 --- PyukiWiki-Devel/build/lang.pl:1.296 Wed Jan 4 02:18:05 2012 +++ PyukiWiki-Devel/build/lang.pl Wed Jan 4 03:49:12 2012 @@ -1,5 +1,5 @@ # release file perl script for pyukiwiki -# $Id: lang.pl,v 1.296 2012/01/03 17:18:05 papu Exp $ +# $Id: lang.pl,v 1.297 2012/01/03 18:49:12 papu Exp $ $lang=$ARGV[0]; $src=$ARGV[1]; Index: PyukiWiki-Devel/build/text.pl diff -u PyukiWiki-Devel/build/text.pl:1.348 PyukiWiki-Devel/build/text.pl:1.349 --- PyukiWiki-Devel/build/text.pl:1.348 Wed Jan 4 02:18:05 2012 +++ PyukiWiki-Devel/build/text.pl Wed Jan 4 03:49:12 2012 @@ -1,5 +1,5 @@ # release file perl script for pyukiwiki -# $Id: text.pl,v 1.348 2012/01/03 17:18:05 papu Exp $ +# $Id: text.pl,v 1.349 2012/01/03 18:49:12 papu Exp $ use Jcode;