13 |
exit 1 |
exit 1 |
14 |
fi |
fi |
15 |
|
|
16 |
wget="-N -nd -nH" |
wget="-nd -nH" |
17 |
|
|
18 |
mkdir /tmp/$name || exit |
dir=/tmp/$name |
19 |
cd /tmp/$name |
|
20 |
|
mkdir $dir || exit |
21 |
|
cd $dir |
22 |
|
|
23 |
|
echo "*** download $url to $dir" |
24 |
|
|
25 |
wget -O index.html $wget $url |
wget -O index.html $wget $url |
26 |
|
|
28 |
|
|
29 |
grep \.txt index.html | cut -d\" -f2 | while read file ; do |
grep \.txt index.html | cut -d\" -f2 | while read file ; do |
30 |
echo "downloading $url/$file" |
echo "downloading $url/$file" |
31 |
wget $wget "$url/$file" |
wget -N $wget "$url/$file" |
32 |
if echo $file | grep '\.gz$' >/dev/null ; then |
if echo $file | grep '\.gz$' >/dev/null ; then |
33 |
cat=zcat |
cat=zcat |
34 |
else |
else |