From f49472a1678a1178209470a649393b570276a044 Mon Sep 17 00:00:00 2001 From: Dirk Koopman Date: Wed, 17 Aug 2016 17:04:00 +0100 Subject: [PATCH 1/1] fix --system on create_sysop.pl Make sure that --system uses and creates files in data. --- perl/create_prefix.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/perl/create_prefix.pl b/perl/create_prefix.pl index 60d7d2a1..809850fd 100755 --- a/perl/create_prefix.pl +++ b/perl/create_prefix.pl @@ -35,9 +35,11 @@ my %pre = (); # the prefix hash my %pren = (); # the inverse my $prefix; +my $system; if (@ARGV && $ARGV[0] =~ /^--system$/) { $prefix = $main::data; + ++$system; shift; } else { $prefix = $main::local_data; @@ -45,7 +47,7 @@ if (@ARGV && $ARGV[0] =~ /^--system$/) { my $ifn; -$ifn = "$prefix/wpxloc.raw"; +$ifn = $system ? "$main::data/wpxloc.raw" : "$prefix/wpxloc.raw"; unless (open (IN, $ifn)) { $ifn = "$main::data/wpxloc.raw"; open(IN, $ifn) or die "can't open $ifn ($!)"; @@ -110,7 +112,7 @@ close(IN); # now open the cty.dat file if it is there my $r; -$ifn = "$prefix/cty.dat"; +$ifn = $system ? "$main::data/cty.dat" : "$prefix/cty.dat"; unless ($r = open (IN, $ifn)) { $ifn = "$main::data/cty.dat"; $r = open(IN, $ifn); -- 2.43.0