1 | #!/bin/bash
|
---|
2 | #
|
---|
3 | # Prepare a new announce concerning mondorescue
|
---|
4 | #
|
---|
5 | # $Id$
|
---|
6 | #
|
---|
7 | # Syntax: mkannounce [ver-tag]
|
---|
8 | #
|
---|
9 |
|
---|
10 | dname=`dirname $0`
|
---|
11 | prem=`echo $dname |cut -c1`
|
---|
12 | if [ ${prem} == "/" ]; then
|
---|
13 | export TOOLHOME=$dname
|
---|
14 | else
|
---|
15 | export TOOLHOME=${PWD}/$dname
|
---|
16 | fi
|
---|
17 |
|
---|
18 | . $TOOLHOME/common-env
|
---|
19 | . $TOOLHOME/distro-env
|
---|
20 | . $TOOLHOME/ftp-env
|
---|
21 |
|
---|
22 | # We need to get $VER and $TAG
|
---|
23 | if [ "$1" = "" ]; then
|
---|
24 | LAST=`cat ${TOPDIR}/LAST`
|
---|
25 | else
|
---|
26 | LAST=$1
|
---|
27 | shift
|
---|
28 | fi
|
---|
29 | VER=`echo $LAST | cut -d- -f1`
|
---|
30 | TAG=`echo $LAST | cut -d- -f2`
|
---|
31 |
|
---|
32 | SEARCH=`echo $LAST | cut -c2-`
|
---|
33 |
|
---|
34 | rm -f $TMP/announce.tmp
|
---|
35 | cat > $TMP/announce.tmp << EOF
|
---|
36 | MondoRescue $LAST is now available</p>
|
---|
37 |
|
---|
38 | <p>I'm happy to announce the availability of a newest version of mondoescue $LAST. Enjoy it as usual!</p>
|
---|
39 | <p>
|
---|
40 | Now available at <a href="ftp://ftp.mondorescue.org/">ftp://ftp.mondorescue.org/
|
---|
41 | </a>
|
---|
42 | </p>
|
---|
43 | <p>
|
---|
44 | EOF
|
---|
45 | ssh ${ACCOUNT} "cd $DSTDIR ; find . -name 'm[oi]nd[io]-[0-9]$SEARCH*'" | grep -v 'src.rpm' >> $TMP/announce.tmp
|
---|
46 | cat >> $TMP/announce.tmp << EOF
|
---|
47 | </p>
|
---|
48 |
|
---|
49 | <p>As usual src.rpm packages are also available in the same directory.</p>
|
---|
50 |
|
---|
51 | <p>
|
---|
52 | Changes are :
|
---|
53 | </p>
|
---|
54 | EOF
|
---|
55 |
|
---|
56 | # Generating log files
|
---|
57 | $TOOLHOME/mkchangelog.pl announce mindi $TMP/mindi.ann
|
---|
58 | $TOOLHOME/mkchangelog.pl announce mondo $TMP/mondo.ann
|
---|
59 | echo "<p>" >> $TMP/announce.tmp
|
---|
60 | sed 's/$/<br>/' $TMP/mindi.ann >> $TMP/announce.tmp
|
---|
61 | echo "</p><p>" >> $TMP/announce.tmp
|
---|
62 | sed 's/$/<br>/' $TMP/mondo.ann >> $TMP/announce.tmp
|
---|
63 | echo "</p>" >> $TMP/announce.tmp
|
---|
64 | rm -f $TMP/mindi.ann $TMP/mondo.ann
|
---|
65 |
|
---|
66 | # Store it in DB for Web pages generation
|
---|
67 | $TOOLHOME/mkannounce.pl $TMP/announce.tmp
|
---|
68 | # Then deliver it on the Web
|
---|
69 | #$TOOLHOME/livwww www
|
---|