]> Pileus Git - ~andy/fetchmail/blob - contrib/getfetchmail
Update German translation.
[~andy/fetchmail] / contrib / getfetchmail
1 #!/bin/bash 
2 RH=ftp.ccil.org
3 p=`\
4 echo dir /pub/esr/fetchmail/f\*src.rpm \
5    | ftp $RH \
6    | grep /pub/esr/fetchmail/fetchmail-[45] \
7    | tail -1`
8 #p='-rw-r--r-- 1 23 wheel 478424 Dec 18 03:54 /pub/esr/fetchmail/fetchmail-4.7.1-1.src.rpm'
9 #echo $p | sed -e "s=^.^/pub=pub="
10 p1=`echo $p | sed -e "s=^.*/pub=pub="`
11 #echo $p1
12 #basename  $p1
13 #dirname $p1
14 d=`dirname $p1`
15 f=`basename $p1`
16 cd /work/incoming
17 email=$LOGNAME\@`hostname`
18 ftp -n <<ZZ
19 open $RH
20 user anonymous $email
21 cd /$d
22 get $f
23 bye
24 ZZ
25 rpm -K $f >/dev/null 2>&1 \
26    || {
27          rpm -K $f 2>&1 | mail $email -s "error getting $f"
28          exit 
29       }
30 rpm --rebuild  $f 2>&1 |\
31    mail $email -s "Rebuilding $f"