#!/usr/bin/env sh which xsltproc >/dev/null test $? -eq 0 || { echo "tool missing: xsltproc" exit 1 } test $# -eq 0 && { xsltproc --encoding utf-8 -o ds-feed.xml rss.xsl data.xml xsltproc --encoding iso-8859-1 -o download.html download.xsl data.xml xsltproc --encoding utf-8 -o index.html index.xsl data.xml exit 0 } test "$1" = "sort" && { xsltproc --encoding utf-8 -o sorted.xml sort.xsl data.xml mv -i sorted.xml data.xml }