blob: 71e1c7b7df73c594d8fded89f51d8a6623525eac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
echo '<table border="0" cellpadding="4" cellspacing="0">'
echo '<tr valign="top">'
echo ' <th align="left">Location</th>'
echo ' <th align="left">Size</th>'
echo ' <th align="left">MD5 Sum</th>'
echo '</tr>'
for i in *.tar.bz2; do
echo '<tr valign="top">'
l=`echo $i | sed -e "s#.tar.bz2##"`
echo ' <td><a href="http://download.kde.org/stable/3.5.10/src/'$i'">'$l'</a></td>'
size=`stat -c "%s" $i`
size=`echo "$size / 1024" | bc`
if test "$size" -lt 1024; then
size="$size"kB
else
size=`echo "($size * 10) / 1024" | bc`
if test "$size" -lt 100; then
size=`echo "$size"MB | sed -e "s#\(.\)MB#.\1MB#"`
else
size=`echo "$size"MB | sed -e "s#\(.\)MB#MB#"`
fi
fi
echo ' <td align="right">'$size'</td>'
md5=`md5sum $i | cut -f1 -d' '`
echo ' <td><tt>'$md5'</tt></td>'
echo '</tr>'
echo ''
done
echo '</table>'
|