diff --git a/mkdocs.sh b/mkdocs.sh new file mode 100755 index 00000000..4411c2e5 --- /dev/null +++ b/mkdocs.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +set -eux +commit="$(git rev-parse "$1^{commit}")" + +tmp="$(mktemp --directory)" +trap "rm -rvf \"$tmp\"" EXIT + +# c-o +git worktree add "$tmp" "$commit" +trap "git worktree remove \"$tmp\"" EXIT +cd "$tmp" + +# make +cd docs +make html + +# rsync +rsync -raAXP _build/html/ "Gimli:WWW/mwd/$commit/" +ssh Gimli "chmod -R o+rX WWW/mwd/$commit" + +echo Done.