File: download

package info (click to toggle)
edict 2012.05.09-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 11,896 kB
  • sloc: sh: 111; makefile: 41
file content (28 lines) | stat: -rw-r--r-- 622 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh

FILES="edict.gz edict_WHATSNEW edict_doc.html edict_doc.txt \
enamdict.gz enamdict_doc.html enamdict_doc.txt compdic.gz compdic_doc.html"
SERVER="http://ftp.monash.edu.au/pub/nihongo"
WGETOPTS="--no-verbose --timestamping --no-remove-listing"

if ! [ -x "`which wget`" ]
then
    echo "Warning: wget needed for downloading the files."
    echo "Exit."
    exit 1
fi

[ -z "$TMPDIR" ] && TMPDIR="/tmp"

mkdir -p -m 755 $TMPDIR/edict
cd $TMPDIR/edict

URLS=""
for f in $FILES
do
    URLS="$URLS $SERVER/$f"
done
wget $WGETOPTS $URLS

cd ..
tar --exclude=.listing -cvzf $TMPDIR/edict-`date +%Y.%m.%d`.tar.gz edict