projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
probably fix Script erase error
[spider.git]
/
perl
/
gen_usdb_data.pl
diff --git
a/perl/gen_usdb_data.pl
b/perl/gen_usdb_data.pl
index edd74dab2ea0cebcb8aae788bcee022d16fcb291..7857a5c534695ddec9f4d7f3206deabe7c4d39e7 100755
(executable)
--- a/
perl/gen_usdb_data.pl
+++ b/
perl/gen_usdb_data.pl
@@
-1,4
+1,4
@@
-#!/usr/bin/perl
+#!/usr/bin/
env
perl
#
# Something to create my subset of the US call book data,
# in my flat file form, either from the main data base or
#
# Something to create my subset of the US call book data,
# in my flat file form, either from the main data base or
@@
-23,7
+23,7
@@
#
# Copyright (c) 2002 Dirk Koopman G1TLH
#
#
# Copyright (c) 2002 Dirk Koopman G1TLH
#
-#
$Id$
+#
#
use strict;
#
use strict;
@@
-36,17
+36,14
@@
BEGIN {
$root = "/spider";
$root = $ENV{'DXSPIDER_ROOT'} if $ENV{'DXSPIDER_ROOT'};
$root = "/spider";
$root = $ENV{'DXSPIDER_ROOT'} if $ENV{'DXSPIDER_ROOT'};
+ mkdir "$root/local_data", 02777 unless -d "$root/local_data";
+
unshift @INC, "$root/perl"; # this IS the right way round!
unshift @INC, "$root/local";
}
unshift @INC, "$root/perl"; # this IS the right way round!
unshift @INC, "$root/local";
}
-use vars qw($VERSION $BRANCH);
-$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
-$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0));
-$main::build += $VERSION;
-$main::branch += $BRANCH;
+use SysVar;
-use DXVars;
use Archive::Zip qw(:ERROR_CODES);
use Archive::Zip::MemberRead;
use IO::File;
use Archive::Zip qw(:ERROR_CODES);
use Archive::Zip::MemberRead;
use IO::File;
@@
-56,7
+53,7
@@
my $blksize = 1024 * 1024;
STDOUT->autoflush(1);
STDOUT->autoflush(1);
-my $dbrawfn =
"$main::data/usdbraw.gz"
;
+my $dbrawfn =
localdata("usdbraw.gz")
;
rename "$dbrawfn.oo", "$dbrawfn.ooo";
rename "$dbrawfn.o", "$dbrawfn.oo";
rename "$dbrawfn.oo", "$dbrawfn.ooo";
rename "$dbrawfn.o", "$dbrawfn.oo";
@@
-81,7
+78,7
@@
sub handleEN
{
my ($zip, $argv) = @_;
my $mname = "EN.dat";
{
my ($zip, $argv) = @_;
my $mname = "EN.dat";
- my $ofn =
"$main::data/$mname"
;
+ my $ofn =
localdata($mname)
;
print " Handling EN records, unzipping";
if ($zip->extractMember($mname, $ofn) == AZ_OK) {
my $fh = new IO::File "$ofn" or die "Cannot open $ofn $!";
print " Handling EN records, unzipping";
if ($zip->extractMember($mname, $ofn) == AZ_OK) {
my $fh = new IO::File "$ofn" or die "Cannot open $ofn $!";