Tools again

--Upd doxygen version_number to github link, for easier comparaison
--Fix convert_sql calling case, now doesn't care from where perl script
is called.
This commit is contained in:
lighta 2013-11-28 02:44:52 -05:00
parent 6236b7dc6a
commit 1d485ca934
3 changed files with 10 additions and 4 deletions

View File

@ -126,10 +126,12 @@ sub UpdDoxyConf { my ($repoversion) = @_;
if(($chked&1)==0 && $_ =~ /^PROJECT_NUMBER/) { if(($chked&1)==0 && $_ =~ /^PROJECT_NUMBER/) {
chomp($_); chomp($_);
@line = split('=',$_); @line = split('=',$_);
my $old_version = $line[1]; @line = split('/',$line[1]);
my $old_version = $line[scalar(@line)-1];
print "old_version found=$old_version, current version=$repoversion \n";
if($old_version == $repoversion) { $sSkipBuild=1; } if($old_version == $repoversion) { $sSkipBuild=1; }
elsif($sNoUpd==0) { print "Updated project number\n"; } elsif($sNoUpd==0) { print "Updated project number\n"; }
print FHOUT "PROJECT_NUMBER = $repoversion\n"; print FHOUT "PROJECT_NUMBER = http://github.com/rathena/rathena/commit/$repoversion\n";
$chked &=1; $chked &=1;
} }
elsif(($chked&2)==0 && $_ =~ /^OUTPUT_DIRECTORY/){ elsif(($chked&2)==0 && $_ =~ /^OUTPUT_DIRECTORY/){

View File

@ -15,7 +15,7 @@ my $sTarget = "All";
my $sValidTarget = "All|Script|Atc"; my $sValidTarget = "All|Script|Atc";
my($filename, $dir, $suffix) = fileparse($0); my($filename, $dir, $suffix) = fileparse($0);
chdir $dir; #put ourself like was called in main folder chdir $dir; #put ourself like was called in tool folder
GetArgs(); GetArgs();
Main($sTarget); Main($sTarget);

View File

@ -18,6 +18,7 @@
use strict; use strict;
use warnings; use warnings;
use Getopt::Long; use Getopt::Long;
use File::Basename;
my $sFilein = ""; my $sFilein = "";
my $sFileout = ""; my $sFileout = "";
@ -75,6 +76,8 @@ sub GetArgs {
sub Main { sub Main {
GetArgs(); GetArgs();
my($filename, $dir, $suffix) = fileparse($0);
chdir $dir; #put ourself like was called in tool folder
BuildDataForType($sTarget,$sType); BuildDataForType($sTarget,$sType);
ConvertFile($sFilein,$sFileout,$sType); ConvertFile($sFilein,$sFileout,$sType);
print "Conversion ended.\n"; print "Conversion ended.\n";
@ -372,3 +375,4 @@ CREATE TABLE `$db` (
"; ";
} }
} }