+++ /dev/null
-[About this module]\r
-This library offers the procedure which you want to use in many cases when you are developing, especially when you are developing for web application or backend application for it.\r
-This library is created by Hajime Kurita.\r
-The name 1stclass derives from the fact that the code is used for web application of http://www.1stclass.co.jp/\r
-\r
-Example:\r
-Blog search & analysis system: http://minakoe.jp/\r
-Japanese works database: http://www.accessup.org/anime/\r
-\r
-The code is distributed on http://sourceforge.jp/projects/lib1stclass/\r
-More detailed information is avaiable on blog.\r
-Japanese: http://www.accessup.org/pj/6_B4C9CDFDBFCDA4B5A4F3/5/list.html\r
-\r
-[License]\r
-You can use this under the license of GPL ver.3.\r
-\r
-[Install]\r
-make clean;\r
-make;\r
-make test;\r
-make install;\r
-\r
-[Usage]\r
-For C,\r
-lib1stclass.so\r
-lib1stclass.a\r
-\r
-For C++,\r
-lib1stclass_cxx.so\r
-lib1stclass_cxx.a\r
-\r
-are available.\r
-\r
-You can find functions, methods and how to use this library by reading the source code of t/test.cpp.\r
#!/usr/bin/perl\r
use strict;\r
use FileHandle;\r
+my $release=0;\r
+foreach my $ARGV (@ARGV){\r
+ if($ARGV=~ m!^--release!){\r
+ $release++;\r
+ }\r
+}\r
+\r
my $version='';\r
if(my $fh=new FileHandle("Changes")){\r
while(<$fh>){\r
$fh->close();\r
}\r
if($version){\r
- my @files=('/usr/local/include/lib1stclass.hpp', '/usr/local/include/lib1stclass.h');\r
- foreach my $file (@files){\r
- if(my $fh=new FileHandle($file)){\r
- local $/=undef;\r
- my $con=<$fh>;\r
- $fh->close();\r
- unless($con=~ m!// VERSION=[\d\.]+ //!){\r
- if(my $fh=new FileHandle('>> '.$file)){\r
- print $fh "\n// VERSION=".$version."//\n";\r
- $fh->close();\r
+ if($release){\r
+ my $dir='lib1stclass-'.$version;\r
+ my @cm=('mkdir '.$dir, 'cp *.c '.$dir, 'cp *.cpp '.$dir, 'cp *.h '.$dir, 'cp *.hpp '.$dir, 'cp *.pl '.$dir, 'cp Makefile '.$dir, 'cp Changes '.$dir, 'cp README '.$dir, 'mkdir -p '.$dir.'/t', 'cp t/*.cpp '.$dir.'/t', 'cp t/*.c '.$dir.'/t', 'tar cvf '.$dir.'.tar '.$dir, 'gzip '.$dir.'.tar');\r
+ foreach my $cm (@cm){\r
+ print $cm."\n";\r
+ system($cm);\r
+ }\r
+ }\r
+ else{\r
+ my @files=('/usr/local/include/lib1stclass.hpp', '/usr/local/include/lib1stclass.h');\r
+ foreach my $file (@files){\r
+ if(my $fh=new FileHandle($file)){\r
+ local $/=undef;\r
+ my $con=<$fh>;\r
+ $fh->close();\r
+ unless($con=~ m!// VERSION=[\d\.]+ //!){\r
+ if(my $fh=new FileHandle('>> '.$file)){\r
+ print $fh "\n// VERSION=".$version."//\n";\r
+ $fh->close();\r
+ }\r
}\r
}\r
}\r