From 4366780069b6d4b892b69e5417d367211008e69e Mon Sep 17 00:00:00 2001 From: "Pavel \"LEdoian\" Turinsky" Date: Mon, 21 Nov 2022 00:49:41 +0100 Subject: [PATCH] =?UTF-8?q?Skript=20na=20automatick=C3=A9=20buildy=20dokum?= =?UTF-8?q?entace=20r=C5=AFzn=C3=BDch=20v=C4=9Btv=C3=AD=20/=20commit=C5=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mkdocs.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 mkdocs.sh 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.