#!/bin/bash # # Prepare a new announce concerning mondorescue # # $Id$ # # Syntax: mkannounce [ver-tag] # dname=`dirname $0` prem=`echo $dname |cut -c1` if [ ${prem} == "/" ]; then export TOOLHOME=$dname else export TOOLHOME=${PWD}/$dname fi . $TOOLHOME/common-env . $TOOLHOME/distro-env . $TOOLHOME/ftp-env # We need to get $VER and $TAG if [ "$1" = "" ]; then LAST=`cat ${TOPDIR}/LAST` else LAST=$1 shift fi VER=`echo $LAST | cut -d- -f1` TAG=`echo $LAST | cut -d- -f2` SEARCH=`echo $VER | cut -c2-` rm -f $MONDOTMP/announce.tmp cat > $MONDOTMP/announce.tmp << EOF MondoRescue $VER is now available

I'm happy to announce the availability of a newest version of mondoescue $VER. Enjoy it as usual!

Now available at ftp://ftp.mondorescue.org/

EOF ssh ${ACCOUNT} "cd $DSTDIR ; find . -name 'm[oi]nd[io]-[0-9]$SEARCH*'" | grep -v 'src.rpm' >> $MONDOTMP/announce.tmp cat >> $MONDOTMP/announce.tmp << EOF

As usual src.rpm packages are also available in the same directory.

Changes are :

EOF # Generating log files $TOOLHOME/mkchangelog.pl announce mindi $MONDOTMP/mindi.ann $TOOLHOME/mkchangelog.pl announce mondo $MONDOTMP/mondo.ann echo "

" >> $MONDOTMP/announce.tmp sed 's/$/
/' $MONDOTMP/mindi.ann >> $MONDOTMP/announce.tmp echo "

" >> $MONDOTMP/announce.tmp sed 's/$/
/' $MONDOTMP/mondo.ann >> $MONDOTMP/announce.tmp echo "

" >> $MONDOTMP/announce.tmp rm -f $MONDOTMP/mindi.ann $MONDOTMP/mondo.ann vi $MONDOTMP/announce.tmp # Store it in DB for Web pages generation $TOOLHOME/mkannounce.pl $MONDOTMP/announce.tmp # Then deliver it on the Web $TOOLHOME/livwww www cat > $MONDOTMP/announce.hdr << EOF

EOF cat > $MONDOTMP/announce.ftr << EOF EOF # Mail it to mr ML cat $MONDOTMP/announce.hdr $MONDOTMP/announce.tmp $MONDOTMP/announce.ftr | w3m -dump -T text/html > $MONDOTMP/mondo.ann.txt export EMAIL="bruno@mondorescue.org" cat $MONDOTMP/mondo.ann.txt | mutt -s "`head -1 $MONDOTMP/mondo.ann.txt`" mondo-devel@lists.sourceforge.net -c mondorescue-announce@lists.berlios.de rm -rf $MONDOTMP