| 1 |
hertzog |
344 |
#!/bin/bash
|
| 2 |
|
|
|
| 3 |
|
|
verbose=
|
| 4 |
|
|
|
| 5 |
|
|
if [ -d "incoming" ]; then
|
| 6 |
|
|
root="$PWD"
|
| 7 |
|
|
elif [ -d "../incoming" ]; then
|
| 8 |
|
|
root="$PWD/.."
|
| 9 |
|
|
else
|
| 10 |
hertzog |
345 |
root="/org/packages.qa.debian.org/www"
|
| 11 |
hertzog |
344 |
fi
|
| 12 |
|
|
|
| 13 |
|
|
if [ "$1" = "-v" ]; then
|
| 14 |
|
|
verbose=1
|
| 15 |
|
|
fi
|
| 16 |
|
|
|
| 17 |
|
|
cd $root/base
|
| 18 |
|
|
date=`LC_ALL=C date -u`
|
| 19 |
|
|
|
| 20 |
|
|
while read package
|
| 21 |
|
|
do
|
| 22 |
|
|
hash=${package:0:1}
|
| 23 |
|
|
if [ "${package:0:3}" = "lib" ]; then
|
| 24 |
|
|
hash=${package:0:4}
|
| 25 |
|
|
fi
|
| 26 |
|
|
dir=$hash/$package
|
| 27 |
|
|
param="--stringparam dir $dir --stringparam package $package"
|
| 28 |
|
|
for i in other experimental stable testing unstable
|
| 29 |
|
|
do
|
| 30 |
|
|
if [ -f $dir/$i.xml ]; then
|
| 31 |
|
|
input=$dir/$i.xml
|
| 32 |
|
|
param="$param --stringparam has$i yes"
|
| 33 |
|
|
fi
|
| 34 |
|
|
done
|
| 35 |
|
|
if [ ! -d ../web/$dir/static ]; then
|
| 36 |
|
|
mkdir -p ../web/$dir/{static,auto,news} || true
|
| 37 |
|
|
fi
|
| 38 |
|
|
if [ -n "$verbose" ]; then
|
| 39 |
|
|
echo "Doing $package ..."
|
| 40 |
|
|
fi
|
| 41 |
|
|
xsltproc -o $root/web/$dir.html --stringparam date "$date" \
|
| 42 |
|
|
$param ../xsl/pts.xsl $input
|
| 43 |
|
|
done
|
| 44 |
|
|
|