aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/getfetchmail
blob: bcac9d3e6eb1c2dd3599febbd586857269dd87bb (plain)
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
29
30
31
#!/bin/bash 
RH=ftp.ccil.org
p=`\
echo dir /pub/esr/fetchmail/f\*src.rpm \
   | ftp $RH \
   | grep /pub/esr/fetchmail/fetchmail-[45] \
   | tail -1`
#p='-rw-r--r-- 1 23 wheel 478424 Dec 18 03:54 /pub/esr/fetchmail/fetchmail-4.7.1-1.src.rpm'
#echo $p | sed -e "s=^.^/pub=pub="
p1=`echo $p | sed -e "s=^.*/pub=pub="`
#echo $p1
#basename  $p1
#dirname $p1
d=`dirname $p1`
f=`basename $p1`
cd /work/incoming
email=$LOGNAME\@`hostname`
ftp -n <<ZZ
open $RH
user anonymous $email
cd /$d
get $f
bye
ZZ
rpm -K $f >/dev/null 2>&1 \
   || {
         rpm -K $f 2>&1 | mail $email -s "error getting $f"
         exit 
      }
rpm --rebuild  $f 2>&1 |\
   mail $email -s "Rebuilding $f"
class="nv">$dest scp index.html $dest scp history.html $dest echo "Upload to ${WWWVIRTUAL} complete" echo "Beginning FTP upload..." lftp <<EOF # Copy to FTP site open $FTPHOST cd $FTPDIR/fetchmail put fetchmail-${version}.tar.gz put fetchmail-${version}-1.i386.rpm put fetchmail-${version}-1.src.rpm close echo "FTP upload complete." # Next, upload to Metalab echo "Beginning Metalab upload..." open -u anonymous,esr@thyrsus.com metalab.unc.edu cd incoming/Linux put fetchmail-${version}.tar.gz put fetchmail.lsm put README -o fetchmail.README put fetchmail-FAQ.html put fetchmail-${version}-1.i386.rpm put fetchmail-${version}-1.src.rpm close echo "Upload to Metalab complete" # Finally, upload the RPMS to Red Hat echo "Beginning Red Hat upload" open incoming.redhat.com cd libc6 put fetchmail-${version}-1.i386.rpm put fetchmail-${version}-1.src.rpm close echo "Upload to Red Hat contrib complete" EOF echo "fetchmail uploaded" fi