version 1.1, 2009/01/30 00:36:10 |
version 1.2, 2009/02/01 19:53:56 |
|
|
$OpenBSD$ |
$OpenBSD$ |
--- dicfiles/getdics.pl.orig Fri Jan 30 02:45:04 2009 |
--- dicfiles/getdics.pl.orig Sun Oct 29 20:17:36 2006 |
+++ dicfiles/getdics.pl Fri Jan 30 03:05:17 2009 |
+++ dicfiles/getdics.pl Sun Feb 1 21:35:57 2009 |
@@ -15,10 +15,10 @@ my $SYSTEMWIDE = ($< == 0) ? 1 : 0; # if we run as roo |
@@ -15,10 +15,10 @@ my $SYSTEMWIDE = ($< == 0) ? 1 : 0; # if we run as roo |
|
|
my $UTFDICDIR; |
my $UTFDICDIR; |
|
|
|
|
# DOWNLOAD |
# DOWNLOAD |
-#wget -c http://ftp.cc.monash.edu.au/pub/nihongo/edict.gz -O dl/edict.gz |
-#wget -c http://ftp.cc.monash.edu.au/pub/nihongo/edict.gz -O dl/edict.gz |
+#ftp -CV ftp://ftp.monash.edu.au/pub/nihongo/edict.gz -o dl/edict.gz |
- if (! -f "$DLDIR/$dic->{package}") { |
if (! -f "$DLDIR/$dic->{package}") { |
+#ftp -o dl/edict.gz ftp://ftp.monash.edu.au/pub/nihongo/edict.gz |
|
+if (! -f "$DLDIR/$dic->{package}") { |
print "Downloading \"$dic->{name}\" from $dic->{url}\n"; |
print "Downloading \"$dic->{name}\" from $dic->{url}\n"; |
- my @wget = ("$WGET -q -c $dic->{url} -O $DLDIR/$dic->{package}"); |
- my @wget = ("$WGET -q -c $dic->{url} -O $DLDIR/$dic->{package}"); |
- if (system(@wget) != 0) { |
- if (system(@wget) != 0) { |
+ my @ftp = ("$FTP -CV $dic->{url} -o $DLDIR/$dic->{package}"); |
+ my @ftp = ("$FTP -o $DLDIR/$dic->{package} $dic->{url}"); |
+ if (system(@ftp) != 0) { |
+ if (system(@ftp) != 0) { |
$dic->{status} = "download failed"; |
$dic->{status} = "download failed"; |
next; |
next; |
} |
} |
|
@@ -341,12 +341,12 @@ foreach my $dic (@dics) { |
|
|
|
|
|
# UNPACK |
|
-#gunzip <dl/edict.gz >tmp/edict |
|
+#gunzip -o tmp/edict dl/edict.gz |
|
#unzip -o dl/classical.zip -d tmp |
|
if (! -f "$DLDIR/$dic->{sourcefile}") { |
|
my @unpack; |
|
if ($dic->{format} eq "gzip") { |
|
- @unpack = ("$GUNZIP <$DLDIR/$dic->{package} >$DLDIR/$dic->{sourcefile}"); |
|
+ @unpack = ("$GUNZIP -o $DLDIR/$dic->{sourcefile} $DLDIR/$dic->{package}"); |
|
#print join(" ", @unpack) . "\n"; |
|
if (system(@unpack) != 0) { |
|
$dic->{status} = "unpack failed"; |
@@ -373,8 +373,8 @@ foreach my $dic (@dics) { |
@@ -373,8 +373,8 @@ foreach my $dic (@dics) { |
if (! -f "$UTFDICDIR/$dic->{targetfile}") { |
if (! -f "$UTFDICDIR/$dic->{targetfile}") { |
my @iconv; |
my @iconv; |