winpixel/build.sh

11 lines
519 B
Bash
Executable File

#!/bin/sh -e
dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
# Validate against the XSD whenever possible
command -v xmllint && xmllint --schema "$dir/xml/winpixel.xsd" "$dir/winpixel.xml"
xsltproc "$dir/xml/checks.xsl" "$dir/winpixel.xml" | sh -
xsltproc "$dir/xml/html_list.xsl" "$dir/winpixel.xml" | while read name; do
echo "Processing gallery '$name'"
xsltproc --stringparam name "$name" "$dir/xml/html_gen.xsl" "$dir/winpixel.xml" > "$dir/$name.html.new" \
&& mv "$dir/$name.html.new" "$dir/$name.html"
done