svnno****@sourc*****
svnno****@sourc*****
2009年 3月 26日 (木) 19:27:27 JST
Revision: 3242 http://svn.sourceforge.jp/view?root=ttssh2&view=rev&rev=3242 Author: yutakapon Date: 2009-03-26 19:27:27 +0900 (Thu, 26 Mar 2009) Log Message: ----------- svnrev ãã§ããã®ã§ãåé¤ããã Removed Paths: ------------- trunk/installer/make_svn_revision.pl Deleted: trunk/installer/make_svn_revision.pl =================================================================== --- trunk/installer/make_svn_revision.pl 2009-03-26 10:09:08 UTC (rev 3241) +++ trunk/installer/make_svn_revision.pl 2009-03-26 10:27:27 UTC (rev 3242) @@ -1,107 +0,0 @@ -# -# Subversion(SVN)ÌÅVrWðæ¾·é -# -# Subversion 1.6ÅmF (2009.03.25 yutaka) -# - -$svnfile = '../.svn/entries'; -$headerfile = '../teraterm/ttpdlg/svnversion.h'; - -$val = getVersion($svnfile); -print "SVN#: $val\n"; - -#$val = -1; -makeVersionHeader($val); - -exit(0); - -sub makeVersionHeader { - my($rev) = shift(@_); - my($msg); - - if (!open(FP, "> $headerfile")) { - print "Can not write: $headerfile\n"; - goto error; - } - - if ($val < 0) { - $msg = '#undef SVNVERSION'; - } else { - $msg = "#define SVNVERSION $rev"; - } - - print FP <<EOD; -/* This file was automatically generated by make_svn_revision.pl. - * Don't modify this file. - */ -$msg -EOD - - close(FP); - - print "Success: $headerfile was created.\n"; - -error: - -} - -sub getVersion { - my($file) = shift(@_); - my($ret) = -1; - my($line, $count, $inblock, $author); - - if (!(-e "$file")) { - print "Not found: $file\n"; - goto error; - } - - if (!open(FP, "< $file")) { - print "Can not open: $file\n"; - goto error; - } - - $count = 0; - $inblock = 0; - while ($line = <FP>) { - chomp($line); - $line =~ s/^\s+//; - - if ($inblock == 0) { - if ($line ne '') { - # ósÅÈ¢nßÌsª½çAubNÌJnÆ©È·B - $count++; - $inblock = 1; - } - } else { - if ($line eq '') { - # ubNÌIíèiósjª½©Ç¤©B - $inblock = 0; - } - } - - if ($count == 3) { # 3ÂßÌubNÉ svn info îñª éB - if ($line =~ /^\d{4}-\d{2}-\d{2}/) { - # êsÚͳ - - } elsif ($line =~ /^(\d+)/) { # SVNrW - $ret = $1; - - } elsif ($line =~ /^(\w+)/) { - if ($ret > 0) { - $author = $1; - last; - } - } - } - - } - - print "$ret $author\n"; - - close(FP); - -error: - return ($ret); -} - -