Readded increment_version.pl because it's actually needed for building on OSX.

This commit is contained in:
Kyzentun
2014-07-17 03:05:50 -06:00
committed by Jonathan Payne
parent a40b7aa921
commit 1ff292ad24
+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/perl -w
use File::Copy;
$ver = 0;
if( open FH, '<ver.cpp' )
{
<FH> =~ /version_num = (\d+);/ and $ver = $1 + 1;
close FH;
}
chop( $date = `date` );
chop( $time = `time` );
open FH, '>.ver.tmp' or die $!;
print FH <<"EOF";
extern const unsigned long version_num = $ver;
extern const char *const version_date = "$date";
extern const char *const version_time = "$time";
EOF
close FH;
move '.ver.tmp', 'ver.cpp';