summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
4f1c00b)
Make sure that --system uses and creates files in data.
my %pren = (); # the inverse
my $prefix;
my %pren = (); # the inverse
my $prefix;
if (@ARGV && $ARGV[0] =~ /^--system$/) {
$prefix = $main::data;
if (@ARGV && $ARGV[0] =~ /^--system$/) {
$prefix = $main::data;
shift;
} else {
$prefix = $main::local_data;
shift;
} else {
$prefix = $main::local_data;
-$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 ($!)";
unless (open (IN, $ifn)) {
$ifn = "$main::data/wpxloc.raw";
open(IN, $ifn) or die "can't open $ifn ($!)";
# now open the cty.dat file if it is there
my $r;
# 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);
unless ($r = open (IN, $ifn)) {
$ifn = "$main::data/cty.dat";
$r = open(IN, $ifn);