Skip to content

Commit 546142d

Browse files
elderingDOMjudge
authored andcommitted
Add update.sh script from [email protected]:doc_update/.
1 parent d94f865 commit 546142d

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

update_docs.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash -ex
2+
3+
DOC_REPO=/home/domjudge/doc_update/doc_repo
4+
WEBSERVER_PATH=/srv/http/domjudge/docs/manual
5+
JSON="${WEBSERVER_PATH}/versions.json"
6+
7+
for version in `cat "${JSON}" | jq -r -c '.[]'`; do
8+
rm -rf "${WEBSERVER_PATH}/${version}"
9+
mkdir -p "${WEBSERVER_PATH}/${version}"
10+
(
11+
cd "${DOC_REPO}"
12+
git stash
13+
git checkout "${version}"
14+
git pull
15+
rm -rf doc/manual/build/html/
16+
if [ "$version" = "main" ]; then
17+
sed -i -e "s/^version.*/version = 'main'/" doc/manual/version.py.in
18+
fi
19+
./bootstrap
20+
./configure
21+
make docs
22+
cp -r doc/manual/build/html/* "${WEBSERVER_PATH}/${version}/"
23+
)
24+
done

0 commit comments

Comments
 (0)