makedist-announcement: integrate preview image in announcements

This commit is contained in:
Silvan Calarco 2012-07-28 18:29:49 +02:00
parent 5795417cd6
commit 0ee7992ed0

View File

@ -195,7 +195,6 @@ function print_group() {
return 1 return 1
} }
grep " $searchgroup " $catalogfile | \ grep " $searchgroup " $catalogfile | \
while read line; do while read line; do
set -- $line set -- $line
@ -207,6 +206,7 @@ function print_group() {
print_include_section() { print_include_section() {
local incfile=$1 local incfile=$1
local title=$2 local title=$2
local preadd=$3
local f destincfile local f destincfile
for f in $mediumdir/info/$incfile $fallbackmediumdir/info/$incfile; do for f in $mediumdir/info/$incfile $fallbackmediumdir/info/$incfile; do
@ -214,8 +214,9 @@ print_include_section() {
done done
if [ "$destincfile" ]; then if [ "$destincfile" ]; then
echo "<h3>$title</h3>" >> $outputfile echo "<div><h3>$title</h3>$preadd" >> $outputfile
cat $destincfile >> $outputfile cat $destincfile >> $outputfile
echo "</div>" >> $outputfile
fi fi
} }
@ -230,8 +231,9 @@ fi
mediumplatform=${MEDIA_PLATFORM[i]} mediumplatform=${MEDIA_PLATFORM[i]}
mediumsubplatform=${MEDIA_SUBPLATFORM[i]} mediumsubplatform=${MEDIA_SUBPLATFORM[i]}
webmediumdir=pub/$distribution/media/$distversion/$mediumname
mediumdir=/var/ftp/$webmediumdir
mediumdir=/var/ftp/pub/$distribution/media/$distversion/$mediumname
[ "$distversion" = "devel" ] && fallbackmediumdir=/var/ftp/pub/$distribution/media/milestone2/$mediumname [ "$distversion" = "devel" ] && fallbackmediumdir=/var/ftp/pub/$distribution/media/milestone2/$mediumname
if [ $mediumsubplatform ]; then if [ $mediumsubplatform ]; then
@ -296,6 +298,10 @@ if [ ! -e $outputfile -o "$REBUILDANNOUNCEMENT" = "1" ]; then
echo $"Generating announcement for"" $distribution $distversion ${MEDIA_NAME[i]}"" ($outputlang)" echo $"Generating announcement for"" $distribution $distversion ${MEDIA_NAME[i]}"" ($outputlang)"
[ -e "$mediumdir/$outputlang/preview/preview-$version.jpg" ] && \
IMG_ADD="<img align=\"right\" src=\"http://$siteaddress/$webmediumdir/$outputlang/preview/preview-$version.jpg\">" ||
IMG_ADD=""
if [ "$distversion" != "devel" ]; then if [ "$distversion" != "devel" ]; then
echo "<h2>"$"$distribution $distversion ${MEDIA_NAME[i]} $version release announcement""</h2>" > $outputfile echo "<h2>"$"$distribution $distversion ${MEDIA_NAME[i]} $version release announcement""</h2>" > $outputfile
echo "<div align=right><i><a href="http://$siteaddress">$sitedomain</a> - $announcementdate</i></div>" >> $outputfile echo "<div align=right><i><a href="http://$siteaddress">$sitedomain</a> - $announcementdate</i></div>" >> $outputfile
@ -311,7 +317,7 @@ if [ ! -e $outputfile -o "$REBUILDANNOUNCEMENT" = "1" ]; then
cat $mediumdir/info/release-notes.$outputlang.html.inc >> $outputfile cat $mediumdir/info/release-notes.$outputlang.html.inc >> $outputfile
} }
print_include_section description.$outputlang.html.inc $"Description" print_include_section description.$outputlang.html.inc $"Description" "$IMG_ADD"
# [ -e $mediumdir/$outputlang/preview/preview.jpg ] && \ # [ -e $mediumdir/$outputlang/preview/preview.jpg ] && \
# echo "<img src='http://$siteaddress/pub/$distribution/media/$distversion/${MEDIA_NAME[i]}/$outputlang/preview/preview.jpg'>" >> $outputfile # echo "<img src='http://$siteaddress/pub/$distribution/media/$distversion/${MEDIA_NAME[i]}/$outputlang/preview/preview.jpg'>" >> $outputfile
@ -348,19 +354,20 @@ $distribution-$mediumname-$l-$mediadistversion-$version.${mediumarch}.${medium_s
<li>"$"Name"": openmamba <li>"$"Name"": openmamba
<li>"$"Type"": "$"GNU/Linux operating system"" <li>"$"Type"": "$"GNU/Linux operating system""
<li>"$"License"": "$"GNU General Public License (GPL) version 3"" <li>"$"License"": "$"GNU General Public License (GPL) version 3""
<li>"$"Release branch"": $distversion
" >> $outputfile " >> $outputfile
if [ "$distversion" = "milestone2" ]; then if [ "$distversion" = "milestone2" ]; then
echo "\ echo "\
<li>"$"Release branch"": $distversion ("$"stable"")
<li>"$"Planned maintenance"": "$"long term"" <li>"$"Planned maintenance"": "$"long term""
<li>"$"Updates level"": "$"bugfix"", "$"security"", "$"end-user applications"" <li>"$"Updates level"": "$"bugfix"", "$"security"", "$"end-user applications""
<li>"$"Default updates channels"": milestone2, milestone2-updates, milestone2-games <li>"$"Default updates channels"": milestone2, milestone2-updates, milestone2-games
" >> $outputfile " >> $outputfile
elif [ "$distversion" = "devel" ]; then elif [ "$distversion" = "devel" ]; then
echo "\ echo "\
<li>"$"Release branch"": $distversion ("$"unstable"")
<li>"$"Planned maintenance"": "$"long term"" <li>"$"Planned maintenance"": "$"long term""
<li>"$"Updates level"": "$"architectural changes"" <li>"$"Updates level"": "$"rolling""
<li>"$"Updates default channels"": devel, devel-games <li>"$"Updates default channels"": devel, devel-games
" >> $outputfile " >> $outputfile
fi fi