makedist-announcements: various updates to annoucements generation
This commit is contained in:
parent
3903632674
commit
098e6a5aa1
@ -3,14 +3,10 @@
|
||||
# makedist-announcement.sh - a makedist component which produces announcements
|
||||
# Copyright (c) 2012 by Silvan Calarco
|
||||
#
|
||||
VERSION=0.1
|
||||
|
||||
archs=(i586 arm x86_64)
|
||||
. /usr/share/makedist/VERSION
|
||||
|
||||
distribution=openmamba
|
||||
mediumarch=i586
|
||||
mediumlang=en
|
||||
signer="Silvan Calarco"
|
||||
siteaddress=www.openmamba.org
|
||||
sitedomain=openmamba.org
|
||||
forumaddress=forum.openmamba.org
|
||||
@ -178,6 +174,8 @@ function print_pkg_line() {
|
||||
local descr=$1
|
||||
local searchpkg=$2
|
||||
|
||||
[ "$3" ] && mediumarch=$3
|
||||
|
||||
[ -f "$blocktmpfile" ] || {
|
||||
echo "Error: print_pkg_line: you must call block_start first; skipping."
|
||||
return 1
|
||||
@ -232,6 +230,12 @@ if [ ! "${MEDIA_NAME[i]}" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# set mediumarch to the first medium architecture for gathering information
|
||||
for a in ${MEDIA_ARCHS[i]}; do
|
||||
mediumarch=$a
|
||||
break
|
||||
done
|
||||
|
||||
mediumplatform=${MEDIA_PLATFORM[i]}
|
||||
mediumsubplatform=${MEDIA_SUBPLATFORM[i]}
|
||||
webmediumdir=pub/$distribution/media/$distversion/$mediumname
|
||||
@ -335,23 +339,25 @@ if [ ! -e $outputfile -o "$REBUILDANNOUNCEMENT" = "1" ]; then
|
||||
|
||||
echo "<h3>"$"Downloads""</h3><table>\
|
||||
<tr><th width=100>"$"Language""</th><th width=50>"$"Arch""</th><th>"$"Download link""</th><th width=50>"$"Size""</th><th width=70>"$"Date""</th><th>MD5</th></tr>" >> $outputfile
|
||||
for l in ${MEDIA_LANGUAGES[i]}; do
|
||||
mediummd5=`cat $mediumdir/$l/$distribution-$mediumname-$l-$mediadistversion-$version.${mediumarch}.${medium_suffix}.MD5.txt | awk '{ print $1; }'`
|
||||
mediumdate=`stat -c %z $mediumdir/$l/$distribution-$mediumname-$l-$mediadistversion-$version.${mediumarch}.${medium_suffix} | sed "s| .*||"`
|
||||
mediumsize=`stat -c %s $mediumdir/$l/$distribution-$mediumname-$l-$mediadistversion-$version.${mediumarch}.${medium_suffix}`
|
||||
mediumsizeMB=`expr $mediumsize / 1048576`
|
||||
for a in ${MEDIA_ARCHS[i]}; do
|
||||
for l in ${MEDIA_LANGUAGES[i]}; do
|
||||
mediummd5=`cat $mediumdir/$l/$distribution-$mediumname-$l-$mediadistversion-$version.${a}.${medium_suffix}.MD5.txt | awk '{ print $1; }'`
|
||||
mediumdate=`stat -c %z $mediumdir/$l/$distribution-$mediumname-$l-$mediadistversion-$version.${a}.${medium_suffix} | sed "s| .*||"`
|
||||
mediumsize=`stat -c %s $mediumdir/$l/$distribution-$mediumname-$l-$mediadistversion-$version.${a}.${medium_suffix}`
|
||||
mediumsizeMB=`expr $mediumsize / 1048576`
|
||||
|
||||
echo -n "<tr><td>" >> $outputfile
|
||||
case $l in
|
||||
en) echo -n $"english" >> $outputfile ;;
|
||||
it) echo -n $"italian" >> $outputfile ;;
|
||||
es) echo -n $"spanish" >> $outputfile ;;
|
||||
*) echo -n $"unknown" >> $outputfile ;;
|
||||
esac
|
||||
echo "</td><td>${mediumarch}</td><td>\
|
||||
<a href='http://$siteaddress/download.html?file=/pub/$distribution/media/$distversion/$mediumname/$l/$distribution-$mediumname-$l-$mediadistversion-$version.${mediumarch}.${medium_suffix}'>\
|
||||
$distribution-$mediumname-$l-$mediadistversion-$version.${mediumarch}.${medium_suffix}</a></td>
|
||||
echo -n "<tr><td>" >> $outputfile
|
||||
case $l in
|
||||
en) echo -n $"english" >> $outputfile ;;
|
||||
it) echo -n $"italian" >> $outputfile ;;
|
||||
es) echo -n $"spanish" >> $outputfile ;;
|
||||
*) echo -n $"unknown" >> $outputfile ;;
|
||||
esac
|
||||
echo "</td><td>${a}</td><td>\
|
||||
<a href='http://$siteaddress/download.html?file=/pub/$distribution/media/$distversion/$mediumname/$l/$distribution-$mediumname-$l-$mediadistversion-$version.${a}.${medium_suffix}'>\
|
||||
$distribution-$mediumname-$l-$mediadistversion-$version.${a}.${medium_suffix}</a></td>
|
||||
<td>$mediumsizeMB MB</td><td>$mediumdate</td><td>$mediummd5</td>" >> $outputfile
|
||||
done
|
||||
done
|
||||
echo -n "</tr></table>" >> $outputfile
|
||||
|
||||
@ -379,7 +385,9 @@ $distribution-$mediumname-$l-$mediadistversion-$version.${mediumarch}.${medium_s
|
||||
echo -n "</ul>" >> $outputfile
|
||||
|
||||
block_start
|
||||
print_pkg_line $"Linux kernel" kernel
|
||||
for a in ${MEDIA_ARCHS[i]}; do
|
||||
print_pkg_line $"Linux kernel ($a)" kernel $a
|
||||
done
|
||||
print_pkg_line $"bootloader (grub)" grub
|
||||
print_pkg_line $"boot system (dracut)" dracut
|
||||
print_pkg_line $"NVIDIA proprietary driver" NVIDIA
|
||||
@ -463,9 +471,9 @@ $distribution-$mediumname-$l-$mediadistversion-$version.${mediumarch}.${medium_s
|
||||
<li><a href='http://$wikiaddress'>"$"$distribution wiki""</a></ul>\
|
||||
" >> $outputfile
|
||||
|
||||
echo -n "</div><hr><p><i>"$"Announcement automatically generated by"" makedist-announcement $VERSION " >> $outputfile
|
||||
echo -n "</div><hr><p><i>"$"Announcement automatically generated by"" makedist $makedist_version " >> $outputfile
|
||||
if [ "$distversion" != "devel" ]; then
|
||||
echo $"and signed off by"" $signer</i>" >> $outputfile
|
||||
echo $"and signed off by"" $ANNOUNCEMENTS_SIGNER</i>" >> $outputfile
|
||||
else
|
||||
echo >> $outputfile
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user