diff --git a/sssg.sh b/sssg.sh new file mode 100644 index 0000000..8628f4e --- /dev/null +++ b/sssg.sh @@ -0,0 +1,70 @@ +#!/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