PyukiWiki CVS Commit
pyuki****@lists*****
2012年 3月 19日 (月) 17:56:20 JST
Index: PyukiWiki-Devel-UTF8/build/base64-org.pl diff -u PyukiWiki-Devel-UTF8/build/base64-org.pl:1.89 PyukiWiki-Devel-UTF8/build/base64-org.pl:1.90 --- PyukiWiki-Devel-UTF8/build/base64-org.pl:1.89 Mon Mar 19 07:50:36 2012 +++ PyukiWiki-Devel-UTF8/build/base64-org.pl Mon Mar 19 17:56:20 2012 @@ -1,36 +1,36 @@ #!/usr/bin/perl #-------------------------------------------------------------- # PyukiWiki Installer CGI Maker -# $Id: base64-org.pl,v 1.89 2012/03/18 22:50:36 papu Exp $ +# $Id: base64-org.pl,v 1.90 2012/03/19 08:56:20 papu Exp $ #-------------------------------------------------------------- -#Article 7465 of comp.lang.perl: -#Xref: feenix.metronet.com comp.lang.perl:7465 -#Path: feenix.metronet.com!news.ecn.bgu.edu!usenet.ins.cwru.edu!howland.reston.a#ns.net!ee.und.ac.za!tplinfm -#From: <barrett (at) lucy (dot) ee (dot) und (dot) ac (dot) za> (Alan Barrett) -#Newsgroups: comp.lang.perl -#Subject: Re: Base 64? -#Date: 1 Nov 1993 14:16:53 +0200 -#Organization: Elec. Eng., Univ. Natal, Durban, S. Africa -#Lines: 202 -#Message-ID: <2b2unl$ikf (at) lucy (dot) ee (dot) und (dot) ac (dot) za> -#References: <uglykidCFrvtp (dot) 11z (at) netcom (dot) com> -#NNTP-Posting-Host: lucy.ee.und.ac.za -# -#In article <uglykidCFrvtp (dot) 11z (at) netcom (dot) com>, -<#uglykid (at) netcom (dot) com> (Joe McDonald) writes: -#> Does anyone have a sub to convert from/to base 64? thanks. -# -#Here's mine. It's not very well tested. -# -#--apb -#Alan Barrett, Dept. of Electronic Eng., Univ. of Natal, Durban, South Africa -#RFC822: <barrett (at) ee (dot) und (dot) ac (dot) za> +# Article 7465 of comp.lang.perl: +# Xref: feenix.metronet.com comp.lang.perl:7465 +# Path: feenix.metronet.com!news.ecn.bgu.edu!usenet.ins.cwru.edu!howland.reston.a#ns.net!ee.und.ac.za!tplinfm +# From: <barrett (at) lucy (dot) ee (dot) und (dot) ac (dot) za> (Alan Barrett) +# Newsgroups: comp.lang.perl +# Subject: Re: Base 64? +# Date: 1 Nov 1993 14:16:53 +0200 +# Organization: Elec. Eng., Univ. Natal, Durban, S. Africa +# Lines: 202 +# Message-ID: <2b2unl$ikf (at) lucy (dot) ee (dot) und (dot) ac (dot) za> +# References: <uglykidCFrvtp (dot) 11z (at) netcom (dot) com> +# NNTP-Posting-Host: lucy.ee.und.ac.za +# +# In article <uglykidCFrvtp (dot) 11z (at) netcom (dot) com>, +# <uglykid (at) netcom (dot) com> (Joe McDonald) writes: +# > Does anyone have a sub to convert from/to base 64? thanks. +# +# Here's mine. It's not very well tested. +# +# --apb +# Alan Barrett, Dept. of Electronic Eng., Univ. of Natal, Durban, South Africa +# RFC822: <barrett (at) ee (dot) und (dot) ac (dot) za> # #-------------------------------------------------------------- #!/usr/bin/perl # base64.pl -- A perl package to handle MIME-style BASE64 encoding # A. P. Barrett <barrett (at) ee (dot) und (dot) ac (dot) za>, October 1993 -# $Revision: 1.89 $$Date: 2012/03/18 22:50:36 $ +# $Revision: 1.90 $$Date: 2012/03/19 08:56:20 $ package base64; Index: PyukiWiki-Devel-UTF8/build/build.pl diff -u PyukiWiki-Devel-UTF8/build/build.pl:1.345 PyukiWiki-Devel-UTF8/build/build.pl:1.346 --- PyukiWiki-Devel-UTF8/build/build.pl:1.345 Mon Mar 19 07:50:36 2012 +++ PyukiWiki-Devel-UTF8/build/build.pl Mon Mar 19 17:56:20 2012 @@ -1,7 +1,8 @@ #!/usr/bin/perl # release file perl script for pyukiwiki -# $Id: build.pl,v 1.345 2012/03/18 22:50:36 papu Exp $ +# $Id: build.pl,v 1.346 2012/03/19 08:56:20 papu Exp $ +$|=1; $DIR=$ARGV[0]; $TYPE=$ARGV[1]; $LF=$ARGV[2]; @@ -415,6 +416,7 @@ sub copyfile { my($temp,$filemode)=@_; + my $files=0; foreach(@dirs) { ($dir,$_mode,$dir_chmod,$file_chmod)=split(/:/,$_); &mkdir("$temp/$dir",$dir_chmod); @@ -428,6 +430,7 @@ next if($file=~/$ignore/); if($file=~/$binary_files/) { ©bin($file_chmod,"$dir/$file","$temp/$dir/$file"); + $files++; }else{ if($file=~/\.inc\.cgi$/) { $file2=$file; @@ -436,7 +439,9 @@ $file2=$file; } ©ascii($file_chmod,"$dir/$file","$temp/$dir/$file2",$filemode); + $files++; } + print STDERR "\r => $files files"; } } closedir(DIR); @@ -444,7 +449,10 @@ foreach(@files) { ($file,$file_chmod)=split(/:/,$_); ©ascii($file_chmod,$file,"$temp/$file",$filemode); + $files++; + print STDERR "\r => $files files"; } + print STDERR "\r => $files files - OK \n"; } @@ -499,7 +507,7 @@ $oldfile="utf8.tmp"; } open(R,"$oldfile"); -print "$oldfile\n"; +#print "$oldfile\n"; open(W,">$new"); my $cut=0; foreach(<R>) { @@ -632,6 +640,32 @@ } close(W); close(R); + + # syntax check + if($new=~/\.(cgi|pl|pm)$/) { + $chk=""; + $fixed=$new; + $fixed=~s/\//-/g; + $fixed="/tmp/$fixed"; + open(R,$new)||exit 1; + open(W,">$fixed")||exit 1; + foreach(<R>) { + next if(/^[\s\t]+use[\s\t].*;/); + print W $_; + } + close(R); + close(W); + open(PIPE,"perl -c $fixed >/dev/stdout 2>/dev/stdout|"); + foreach(<PIPE>) { + $chk.=$_; + } + close(PIPE); + unlink($fixed); + if($chk=~/errors/) { + print STDERR "$new syntax error\n$chk\n"; + exit 1; + } + } # for compact if(0) { if($TYPE=~/compact/ && $new=~/\.pl$|\.cgi$/ && $new!~/\.ini\.cgi$/) { Index: PyukiWiki-Devel-UTF8/build/compressfile.pl diff -u PyukiWiki-Devel-UTF8/build/compressfile.pl:1.336 PyukiWiki-Devel-UTF8/build/compressfile.pl:1.337 --- PyukiWiki-Devel-UTF8/build/compressfile.pl:1.336 Mon Mar 19 07:50:36 2012 +++ PyukiWiki-Devel-UTF8/build/compressfile.pl Mon Mar 19 17:56:20 2012 @@ -1,6 +1,6 @@ #!/usr/bin/perl # yuicompressor script -# $Id: compressfile.pl,v 1.336 2012/03/18 22:50:36 papu Exp $ +# $Id: compressfile.pl,v 1.337 2012/03/19 08:56:20 papu Exp $ $mode=$ARGV[0]; $output=$ARGV[1]; @@ -79,8 +79,8 @@ # . $top # if($mode eq "css"); } -open(R,"$input"); -open(W,">$input.commentcut"); +open(R,"$input")||exit 1; +open(W,">$input.commentcut")||exit 1; my $buf; foreach(<R>) { $buf.= $_; @@ -105,8 +105,8 @@ } &shell("$convert{euc} $input.tmp $input.tmp2"); -open(R,"$input.tmp"); -open(W,">$output"); +open(R,"$input.tmp")||exit 1; +open(W,">$output")||exit 1; print W $top; foreach(<R>) { print W $_; @@ -122,7 +122,7 @@ my($shell)=@_; my $buf; print "$shell\n"; - open(PIPE,"$shell|"); + open(PIPE,"$shell|")||exit 1; foreach(<PIPE>) { chomp; $buf.=$_; Index: PyukiWiki-Devel-UTF8/build/csscolorbuilder.pl diff -u PyukiWiki-Devel-UTF8/build/csscolorbuilder.pl:1.1 PyukiWiki-Devel-UTF8/build/csscolorbuilder.pl:1.2 --- PyukiWiki-Devel-UTF8/build/csscolorbuilder.pl:1.1 Mon Mar 19 07:50:36 2012 +++ PyukiWiki-Devel-UTF8/build/csscolorbuilder.pl Mon Mar 19 17:56:20 2012 @@ -1,6 +1,6 @@ #!/usr/bin/perl # release file perl script for pyukiwiki -# $Id: csscolorbuilder.pl,v 1.1 2012/03/18 22:50:36 papu Exp $ +# $Id: csscolorbuilder.pl,v 1.2 2012/03/19 08:56:20 papu Exp $ # usage csscolorbuilder.pl basecss colortable > outputcss @@ -8,7 +8,7 @@ $table=$ARGV[1]; if(-r $basecss && -r $table) { - open(R,$table)||die; + open(R,$table)||exit 1; foreach(<R>) { chomp; s/\^#.*//g; @@ -21,7 +21,7 @@ } close(R); - open(R,$basecss)||die; + open(R,$basecss)||exit 1; foreach(<R>) { $buf.=$_; }