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

16 lines
305 B
Perl
Raw Normal View History

#!/usr/bin/perl -w
$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` );
open FH, '>ver.cpp' 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;