source: branches/stable/tools/mkannounce @ 1896

Last change on this file since 1896 was 1896, checked in by bruno, 11 years ago

Announce of mondo 2.2.5

  • Property svn:executable set to *
File size: 2.7 KB
Line 
1#!/bin/bash
2#
3# Prepare a new announce concerning mondorescue
4#
5# $Id$
6#
7# Syntax: mkannounce [ver-tag]
8#
9
10dname=`dirname $0`
11prem=`echo $dname |cut -c1`
12if [ _${prem} = _"/" ]; then
13    export TOOLHOME=$dname
14else
15    export TOOLHOME=${PWD}/$dname
16fi
17
18. $TOOLHOME/common-env
19. $TOOLHOME/distro-env
20. $TOOLHOME/ftp-env
21
22# We need to get $VER and $TAG
23if [ "$1" = "" ]; then
24    LAST=`cat ${TOPDIR}/LAST`
25else
26    LAST=$1
27    shift
28fi
29VER=`echo $LAST | cut -d- -f1`
30TAG=`echo $LAST | cut -d- -f2`
31
32SEARCH=`echo $VER | cut -c2-`
33
34rm -f $MONDOTMP/announce.tmp
35cat > $MONDOTMP/announce.tmp << EOF
36MondoRescue $VER is now available</p>
37
38<p>I'm happy to announce the availability of a newest version of mondorescue $VER. Enjoy it as usual!</p>
39<p>
40Now available at <a href="ftp://ftp.mondorescue.org/">ftp://ftp.mondorescue.org/
41</a>
42</p>
43<p>
44EOF
45ssh -q ${ACCOUNT} "cd $DSTDIR ; find . -name 'mondo-2.2.5*'" | grep -v 'src.rpm' >> $MONDOTMP/announce.tmp
46ssh -q ${ACCOUNT} "cd $DSTDIR ; find . -name 'mindi-2.0.0*'" | grep -v 'src.rpm' >> $MONDOTMP/announce.tmp
47ssh -q ${ACCOUNT} "cd $DSTDIR ; find . -name 'mindi-busybox-1.7.3*'" | grep -v 'src.rpm' >> $MONDOTMP/announce.tmp
48cat >> $MONDOTMP/announce.tmp << EOF
49</p>
50
51<p>As usual src.rpm packages are also available in the same directory.</p>
52
53<p>
54Changes are :
55</p>
56EOF
57
58# Generating log files
59$TOOLHOME/mkchangelog.pl announce mindi $MONDOTMP/mindi.ann
60$TOOLHOME/mkchangelog.pl announce mondo $MONDOTMP/mondo.ann
61$TOOLHOME/mkchangelog.pl announce mindi-busybox $MONDOTMP/mindi-busybox.ann
62echo "<p>" >> $MONDOTMP/announce.tmp
63sed 's/$/<br>/' $MONDOTMP/mindi.ann >> $MONDOTMP/announce.tmp
64echo "</p><p>" >> $MONDOTMP/announce.tmp
65sed 's/$/<br>/' $MONDOTMP/mondo.ann >> $MONDOTMP/announce.tmp
66echo "</p><p>" >> $MONDOTMP/announce.tmp
67sed 's/$/<br>/' $MONDOTMP/mindi-busybox.ann >> $MONDOTMP/announce.tmp
68echo "</p>" >> $MONDOTMP/announce.tmp
69rm -f $MONDOTMP/mindi.ann $MONDOTMP/mondo.ann
70
71vi $MONDOTMP/announce.tmp
72# Store it in DB for Web pages generation
73$TOOLHOME/mkannounce.pl $MONDOTMP/announce.tmp
74# Then deliver it on the Web
75$TOOLHOME/livwww www
76cat > $MONDOTMP/announce.hdr << EOF
77<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/x html1/DTD/xhtml1-strict.dtd">
78
79<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" xml:lang="en" lang="en">
80  <head>
81  </head>
82  <body>
83  <p>
84EOF
85cat > $MONDOTMP/announce.ftr << EOF
86</body>
87</html>
88EOF
89# Mail it to mr ML
90cat $MONDOTMP/announce.hdr $MONDOTMP/announce.tmp $MONDOTMP/announce.ftr | w3m -dump -T text/html > $MONDOTMP/mondo.ann.txt
91export EMAIL="bruno@mondorescue.org"
92cat $MONDOTMP/mondo.ann.txt | mutt -s "ANNOUNCE: `head -1 $MONDOTMP/mondo.ann.txt`" mondo-devel@lists.sourceforge.net -c mondorescue-announce@lists.berlios.de
93rm -rf $MONDOTMP
Note: See TracBrowser for help on using the repository browser.