diff --git a/makedist/makedist-announcement.sh b/makedist/makedist-announcement.sh index 26be7df..e7463bb 100755 --- a/makedist/makedist-announcement.sh +++ b/makedist/makedist-announcement.sh @@ -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 "

"$"Downloads""

\ " >> $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 " + echo -n "" >> $outputfile + done done echo -n "
"$"Language"""$"Arch"""$"Download link"""$"Size"""$"Date""MD5
" >> $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 "${mediumarch}\ -\ -$distribution-$mediumname-$l-$mediadistversion-$version.${mediumarch}.${medium_suffix}
" >> $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 "${a}\ +\ +$distribution-$mediumname-$l-$mediadistversion-$version.${a}.${medium_suffix} $mediumsizeMB MB$mediumdate$mediummd5
" >> $outputfile @@ -379,7 +385,9 @@ $distribution-$mediumname-$l-$mediadistversion-$version.${mediumarch}.${medium_s echo -n "" >> $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
  • "$"$distribution wiki""\ " >> $outputfile - echo -n "

    "$"Announcement automatically generated by"" makedist-announcement $VERSION " >> $outputfile + echo -n "


    "$"Announcement automatically generated by"" makedist $makedist_version " >> $outputfile if [ "$distversion" != "devel" ]; then - echo $"and signed off by"" $signer" >> $outputfile + echo $"and signed off by"" $ANNOUNCEMENTS_SIGNER" >> $outputfile else echo >> $outputfile fi