Files
itgmania212121/stepmania/PBProject/scripts/increment_version.pl
T

18 lines
350 B
Perl
Raw Normal View History

#!/usr/bin/perl -w
2007-02-11 01:30:51 +00:00
use File::Copy;
$ver = 0;
if( open FH, '<ver.cpp' )
{
2007-02-04 02:04:30 +00:00
<FH> =~ /version_num = (\d+);/ and $ver = $1 + 1;
close FH;
}
chop( $date = `date` );
2007-02-11 01:30:51 +00:00
open FH, '>.ver.tmp' or die $!;
print FH <<"EOF";
2007-02-04 02:04:30 +00:00
extern const unsigned long version_num = $ver;
extern const char *const version_time = "$date";
EOF
close FH;
2007-02-11 01:30:51 +00:00
move '.ver.tmp', 'ver.cpp';