-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathdeploy.sh
executable file
·41 lines (32 loc) · 959 Bytes
/
deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# this script assumes that you have working checkout of hwop-engine repos.
# in ../hwop-engine/.
# you can test your engine with ../hwop-engine/hwop test
# pull and make sure on master.
git checkout master
git pull
if which dot > /dev/null; then
echo -ne
else
echo "Install graphviz. (sudo apt-get install graphviz)."
exit 1
fi
if which pygmentize > /dev/null; then
echo -ne
else
echo "Install pygments."
echo "sudo apt-get install python-setuptools"
echo "sudo easy_install pygments"
exit 1
fi
outdir=../__hwop_html
[ -f deploy.sh ] || ( echo "must be in root hwop dir."; exit 1; )
../hwop-engine/hwop build --src=wiki --dst=$outdir
git stash > /dev/null
git checkout gh-pages &> /dev/null
git pull --rebase &> /dev/null
rm -rf * > /dev/null
cp -r $outdir/* .
git add --all > /dev/null
git commit --message='gh-pages updated.' && git push origin HEAD:gh-pages
git checkout master &> /dev/null
git stash pop > /dev/null