Nettoyage et excludes supplmentaires.

darcs-hash:20070131003854-1dcb7-cd95269b0415339245b8102bdb98e738d431db05.gz
This commit is contained in:
parret-freaud 2007-01-31 01:38:54 +01:00
parent 9d7176ec2f
commit 9b165acc6d

View file

@ -16,6 +16,7 @@ PATHFTP="/pubftp/august/"
# Distributions à gérer (nb : le nom du répertoire doit être
# le même que celui indiqué dans la liste ci-après).
# Debian, Fedora, Gentoo, Knoppix, Ubuntu
DISTRIB="Knoppix"
#DISTRIB="Debian Fedora Gentoo Knoppix Ubuntu"
@ -34,6 +35,7 @@ cd $PATHFTP
umask 002
# Boucle principale
echo -e $ENTMAIL1 > $LOGMAIL
for DIST in $DISTRIB; do
@ -44,24 +46,22 @@ for DIST in $DISTRIB; do
# Adresse du miroir
MIRROR="rsync://ftp.de.debian.org/debian-cd"
# Architectures à exclure (à choisir parmi :
# alpha arm hppa i386 ia64 m68k mips mipsel powerpc s390)
ARCH_EXCLUDE="alpha arm hppa ia64 m68k mips mipsel powerpc s390"
# alpha arm hppa i386 ia64 m68k mips mipsel powerpc s390 sparc)
ARCH_EXCLUDE="alpha arm hppa ia64 m68k mips mipsel s390"
# Fichiers/repertoires à exclude pour ces architectures
# de la forme "--exclude foo1$ARCH/ --exclude foo2$ARCH/ ... "
#ARCH_FR_EXCL="--exclude ${ARCH} "
# Exclusions supplémentaires
EXCLUDE="--exclude project --exclude bt-cd --exclude jigdo-cd \
--exclude jigdo-dvd --exclude bt-dvd --exclude source --exclude sparc \
--exclude jigdo-dvd --exclude bt-dvd --exclude source \
--exclude HEADER.html --exclude trace --exclude mkimage.log "
# A virer une fois les tests finis
# EXCLUDE=$EXCLUDE"--exclude iso-cd --exclude iso-dvd "
EXCLUDE=$EXCLUDE"--exclude debian-* "
for ARCH in $ARCH_EXCLUDE; do
EXCLUDE=$EXCLUDE"--exclude $ARCH "
done
PATHLOCAL=$PATHFTP"$DIST/"
ENTMAIL2="$DIST ($PATHLOCAL)\n======\n"
TAIL=15
TAIL=15 # Pour le formattage du mail
;;
Fedora)
@ -69,12 +69,11 @@ for DIST in $DISTRIB; do
MIRROR="rsync://ftp.uvsq.fr/fedora/"
# Architectures à exclure (à choisir parmi :
# i386, x86-64)
ARCH_EXCLUDE="x86_64"
ARCH_EXCLUDE=""
# Exclusions supplémentaires
EXCLUDE="--exclude development --exclude test --exclude updates \
--exclude source --exclude debug --exclude os --exclude SRPMS "
# A virer une fois les tests finis
EXCLUDE=$EXCLUDE"--exclude iso "
--exclude source --exclude debug --exclude os --exclude SRPMS \
--exclude *-rescuecd.iso --exclude *-disc* "
for ARCH in $ARCH_EXCLUDE; do
EXCLUDE=$EXCLUDE"--exclude $ARCH "
done
@ -88,12 +87,10 @@ for DIST in $DISTRIB; do
MIRROR="rsync://ftp.belnet.be/gentoo/releases/"
# Architectures à exclure (à choisir parmi :
# alpha, amd64, hppa, ia64, ppc, ppc64, sparc, x86)
ARCH_EXCLUDE="alpha amd64 hppa ia64 ppc ppc64 sparc"
ARCH_EXCLUDE="alpha hppa ia64 ppc ppc64 sparc"
# Exclusions supplémentaires
EXCLUDE="--exclude historical --exclude mips --exclude stages \
--exclude packagecd --exclude snapshots --exclude livecd "
# A virer une fois les tests finis
EXCLUDE=$EXCLUDE"--exclude 2005.1 --exclude 2005.1-r1 "
for ARCH in $ARCH_EXCLUDE; do
EXCLUDE=$EXCLUDE"--exclude $ARCH "
done
@ -109,12 +106,11 @@ for DIST in $DISTRIB; do
# alpha, amd64, hppa, ia64, ppc, ppc64, sparc, x86)
ARCH_EXCLUDE=""
# Exclusions supplémentaires
EXCLUDE="--exclude contrib --exclude docs \
EXCLUDE="--exclude contrib --exclude docs --exclude dvd \
--exclude knoppix-cover --exclude knoppix-customize \
--exclude knoppix-dvd --exclude packages-dvd.txt \
--exclude knoppix-vortrag-als2000 --exclude md5-old --exclude qemu-0.8.1 \
--exclude qemu-0.8.1-windows-README.txt --exclude *DE.iso* "
# A virer une fois les tests finis
EXCLUDE=$EXCLUDE"--exclude knoppix-dvd --exclude KNOPPIX* "
--exclude qemu-0.8.1-windows-README.txt --exclude *DE* "
for ARCH in $ARCH_EXCLUDE; do
EXCLUDE=$EXCLUDE"--exclude $ARCH "
done
@ -149,15 +145,8 @@ for DIST in $DISTRIB; do
esac
# Sorties de test, à virer dans la version finale
echo $MIRROR
echo $ARCH_EXCLUDE
echo $EXCLUDE
echo $PATHLOCAL
umask 002
rsync $RSYNCOPT $EXCLUDE $MIRROR $PATHLOCAL > $LOGRSYNC
# rsync $RSYNCOPT $EXCLUDE $MIRROR > $LOGRSYNC
ERRC=$?
cat $LOGRSYNC
# En cas d'erreur, on notifie avec le code de sortie.
@ -172,11 +161,9 @@ for DIST in $DISTRIB; do
cat $LOGTEMP
STATUS=$(cat $LOGTEMP | wc -l)
if (($STATUS > 2)); then
echo "Une mise à jour à été effectuée"
echo -e $ENTMAIL2 >> $LOGMAIL
cat $LOGTEMP >> $LOGMAIL
echo -e "\n" >> $LOGMAIL
else echo "Pas de mise à jour effectuée"
fi
fi
@ -186,9 +173,9 @@ done
# Fonction d'envoi du mail de notification
mail_ftp() {
local FROM="From:FTP Public (Sila)<august@crans.org>"
local SUBJECT="Notification de synchronisation du FTP (test)"
local RECIPIENT="<augustin@crans.org>"
local FROM="From:FTP Public (Sila)<roots@crans.org>"
local SUBJECT="Notification de synchronisation du FTP"
local RECIPIENT="<roots@crans.org>"
local XMAILER="X-Mailer:Bash sync-ftp (by August')"
echo $1 | mail -a "$FROM" -a "$XMAILER" -s "$SUBJECT" $RECIPIENT < $1
}
@ -198,9 +185,6 @@ LENGTH_MAIL=$(cat $LOGMAIL | wc -l)
if (($LENGTH_MAIL > 4)); then
echo -e $ENTMAIL3 >> $LOGMAIL
mail_ftp $LOGMAIL
# Infos à virer par la suite
echo "Envoi du mail"
else echo "Pas d'envoi de mail"
fi
echo $LENGTH_MAIL