runbsd/post-receive

22 lines
375 B
Plaintext
Raw Normal View History

2018-12-30 12:36:25 +01:00
#!/bin/sh -e
2018-10-18 14:44:55 +02:00
2018-12-30 12:36:25 +01:00
title='Run BSD'
2019-03-18 20:45:56 +01:00
url='https://runbsd.info'
2018-12-30 12:36:25 +01:00
2019-03-18 20:45:56 +01:00
if test -z "${PWD##*.git}"
then repo="$PWD"
else repo="$PWD/.git"
2018-12-30 12:36:25 +01:00
fi
2021-05-23 06:20:32 +02:00
dst=/var/www/htdocs/runbsd
2019-03-18 20:45:56 +01:00
raw="$dst/raw"
src="$dst/src"
2018-10-18 14:44:55 +02:00
2019-01-07 17:16:21 +01:00
rm -rf "${dst:?}/.files"
2019-03-18 20:45:56 +01:00
rm -rf "${raw:?}"
2018-12-15 18:40:37 +01:00
rm -rf "${src:?}"
2019-03-18 20:45:56 +01:00
git clone "$repo" "$raw"
(cd "$raw/.git" && git update-server-info)
2021-05-23 06:20:32 +02:00
/var/www/bin/ssg6 "$raw" "$dst" "$title" "$url" > /dev/null