#!/bin/sh if [ "$1" = "-h" ]; then cat < output/changelog.rst pandoc -s --template=./template.html -f rst -t html -o "output/changelog.html" "output/changelog.rst" rm changelog.rst set -x for i in $files; do without_extension=${i%.*} case $i in *.rst) pandoc -s --template=./template.html -f rst -t html -o "output/$without_extension.html" "$without_extension.rst" ;; "./ssg.sh") # don't copy this file ;; "./shell.nix") # ditto ;; "./template.html") ;; *) cp "$i" "output/$i" ;; esac done set +x