#!/bin/bash verbose= if [ -d "incoming" ]; then root="$PWD" elif [ -d "../incoming" ]; then root="$PWD/.." else root="/org/packages.qa.debian.org/www" fi if [ "$1" = "-v" ]; then verbose=1 fi cd $root/base date=`LC_ALL=C date -u` while read package do hash=${package:0:1} if [ "${package:0:3}" = "lib" ]; then hash=${package:0:4} fi dir=$hash/$package param="--stringparam dir $dir --stringparam package $package" for i in other experimental stable testing unstable do if [ -f $dir/$i.xml ]; then input=$dir/$i.xml param="$param --stringparam has$i yes" fi done if [ ! -d ../web/$dir/static ]; then mkdir -p ../web/$dir/{static,auto,news} || true fi if [ -n "$verbose" ]; then echo "Doing $package ..." fi xsltproc -o $root/web/$dir.html --stringparam date "$date" \ $param ../xsl/pts.xsl $input done