Parent Directory | Revision Log
cleanup and fix for newer wget which is more strict about options
1 | #!/bin/sh |
2 | |
3 | if [ -z "$1" ] ; then |
4 | echo "usage: $0 [URL to mailman list]" |
5 | exit 1 |
6 | fi |
7 | |
8 | url=$1 |
9 | name=`echo $url | sed -e 's!^.*/pipermail/!!' -e 's!/!!g'` |
10 | |
11 | if [ -e $name ] ; then |
12 | echo "$name allready exists!" |
13 | exit 1 |
14 | fi |
15 | |
16 | wget="-nd -nH" |
17 | |
18 | dir=/tmp/$name |
19 | |
20 | mkdir $dir || exit |
21 | cd $dir |
22 | |
23 | echo "*** download $url to $dir" |
24 | |
25 | wget -O index.html $wget $url |
26 | |
27 | echo -n > $name |
28 | |
29 | grep \.txt index.html | cut -d\" -f2 | while read file ; do |
30 | echo "downloading $url/$file" |
31 | wget -N $wget "$url/$file" |
32 | if echo $file | grep '\.gz$' >/dev/null ; then |
33 | cat=zcat |
34 | else |
35 | cat=cat |
36 | fi |
37 | $cat $file | perl -pe 's/^(From.+?) at (.+)$/$1\@$2/g' >> $name |
38 | done |
39 | |
40 | echo "Files left in /tmp/$name/$name" |
Name | Value |
---|---|
svn:executable | * |
ViewVC Help | |
Powered by ViewVC 1.1.26 |