Commit fb74bafa authored by Andreas Kusalananda Kähäri's avatar Andreas Kusalananda Kähäri
Browse files

Change $outdir and put it at the top.

parent e1166049
...@@ -9,6 +9,8 @@ use Getopt::Long qw( :config no_ignore_case ); ...@@ -9,6 +9,8 @@ use Getopt::Long qw( :config no_ignore_case );
use IO::File; use IO::File;
use POSIX qw( floor ceil ); use POSIX qw( floor ceil );
my $outdir = 'fix-analysis_description'
sub usage { sub usage {
print <<USAGE_END; print <<USAGE_END;
TODO: Usage info. TODO: Usage info.
...@@ -267,7 +269,6 @@ foreach my $server (@servers) { ...@@ -267,7 +269,6 @@ foreach my $server (@servers) {
} ## end foreach my $dbtype (@dbtypes) } ## end foreach my $dbtype (@dbtypes)
} ## end foreach my $server (@servers) } ## end foreach my $server (@servers)
my $outdir = 'analysis_desc_fixes';
if ( scalar( keys(%sql) ) > 0 ) { if ( scalar( keys(%sql) ) > 0 ) {
if ( !-d $outdir ) { if ( !-d $outdir ) {
mkdir($outdir); mkdir($outdir);
......
...@@ -10,6 +10,8 @@ use Getopt::Long qw( :config no_ignore_case ); ...@@ -10,6 +10,8 @@ use Getopt::Long qw( :config no_ignore_case );
use IO::File; use IO::File;
use POSIX qw( floor ceil ); use POSIX qw( floor ceil );
my $outdir = 'fix-master_tables';
sub usage { sub usage {
my $padding = ' ' x length($0); my $padding = ' ' x length($0);
...@@ -57,11 +59,11 @@ default, the staging servers). ...@@ -57,11 +59,11 @@ default, the staging servers).
The program will display any discrepancies on the display while The program will display any discrepancies on the display while
writing SQL to files in a subdirectory of the current directory called writing SQL to files in a subdirectory of the current directory called
"master_sync_fixes" that will correct the discrepancies. "$outdir" that will correct the discrepancies.
Each SQL patch file will have the generic name "fix-DBNAME.sql" Each SQL patch file will have the generic name "fix-DBNAME.sql"
where "DBNAME" is the name of the database, e.g., where "DBNAME" is the name of the database, e.g.,
"master_sync_fixes/fix-oryctolagus_cuniculus_otherfeatures_60_3.sql". "$outdir/fix-oryctolagus_cuniculus_otherfeatures_60_3.sql".
A discrepancy is patched by A discrepancy is patched by
...@@ -429,8 +431,6 @@ foreach my $server (@servers) { ...@@ -429,8 +431,6 @@ foreach my $server (@servers) {
} ## end foreach my $server (@servers) } ## end foreach my $server (@servers)
my $outdir = 'master_sync_fixes';
if ( scalar( keys(%sql) ) > 0 ) { if ( scalar( keys(%sql) ) > 0 ) {
if ( !-d $outdir ) { if ( !-d $outdir ) {
mkdir($outdir); mkdir($outdir);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment