makedist-announcement: two columns layout for index
This commit is contained in:
parent
983fc9a778
commit
4504980fdc
@ -3,7 +3,8 @@
|
|||||||
# Copyright (c) 2012 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
# Copyright (c) 2012 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||||
#
|
#
|
||||||
|
|
||||||
VERSION=0.1
|
. /usr/share/makedist/VERSION
|
||||||
|
VERSION=$makedist_version
|
||||||
outputlangs="en it"
|
outputlangs="en it"
|
||||||
distribution="openmamba"
|
distribution="openmamba"
|
||||||
|
|
||||||
@ -73,16 +74,25 @@ fi
|
|||||||
echo $"Generating $distversion announcements index"
|
echo $"Generating $distversion announcements index"
|
||||||
for outputlang in $outputlangs; do
|
for outputlang in $outputlangs; do
|
||||||
indexfile=/var/ftp/pub/$distribution/media/$distversion/release-announcement-index.$outputlang.html.inc
|
indexfile=/var/ftp/pub/$distribution/media/$distversion/release-announcement-index.$outputlang.html.inc
|
||||||
> $indexfile
|
echo "<table>" > $indexfile
|
||||||
for i in `seq 0 ${#MEDIA_NAME[*]}`; do
|
column=0
|
||||||
mediumdir=/var/ftp/pub/$distribution/media/$distversion/${MEDIA_NAME[i]}
|
for i in `seq 1 ${#MEDIA_NAME[*]}`; do
|
||||||
echo -n "${MEDIA_NAME[i]} " >> $indexfile
|
mediumdir=/var/ftp/pub/$distribution/media/$distversion/${MEDIA_NAME[i-1]}
|
||||||
|
version=
|
||||||
for f in $mediumdir/info/release-announcement-*.$outputlang.html; do
|
for f in $mediumdir/info/release-announcement-*.$outputlang.html; do
|
||||||
[ -r $f ] || continue
|
[ -r $f ] || continue
|
||||||
version=`echo $f | sed "s|.*/release-announcement-\(.*\)\.$outputlang.html|\1|"`
|
version=`echo $f | sed "s|.*/release-announcement-\(.*\)\.$outputlang.html|\1|"`
|
||||||
echo "<a href='?distrelease=${distversion}&medium=${MEDIA_NAME[i]}&version=${version}&lang=${outputlang}'>${version}</a>" >> $indexfile
|
|
||||||
done
|
done
|
||||||
[ $i -lt ${#MEDIA_NAME[*]} ] && echo -n "<br>" >> $indexfile
|
[ "$version" ] || continue
|
||||||
|
[ $column -eq 0 ] && echo -n "<tr>" >> $indexfile
|
||||||
|
echo -n "<td>${MEDIA_NAME[i-1]}</td>" >> $indexfile
|
||||||
|
echo -n "<td><a href='?distrelease=${distversion}&medium=${MEDIA_NAME[i-1]}&version=${version}&lang=${outputlang}'>${version}</a></td>" >> $indexfile
|
||||||
|
[ $column -eq 1 ] && echo "</tr>" >> $indexfile
|
||||||
|
# [ $i -lt ${#MEDIA_NAME[*]} ] && echo -n "<br>" >> $indexfile
|
||||||
|
column=`expr $column + 1`
|
||||||
|
[ $column -gt 1 ] && column=0
|
||||||
done
|
done
|
||||||
|
[ $column -eq 0 ] && echo -n "<td></td></tr>" >> $indexfile
|
||||||
|
echo "</table>" >> $indexfile
|
||||||
done
|
done
|
||||||
#fi
|
#fi
|
||||||
|
Loading…
Reference in New Issue
Block a user