forked from nsg-ethz/snowcap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_docs.sh
More file actions
executable file
·34 lines (28 loc) · 903 Bytes
/
Copy pathcreate_docs.sh
File metadata and controls
executable file
·34 lines (28 loc) · 903 Bytes
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
#! /bin/bash
# change directory to workspace
cd "$(dirname "$0")"
# generate the documentation
cargo doc --all-features || exit 1
rm -rf \
target/doc/snowcap \
target/doc/snowcap_bencher \
target/doc/snowcap_ltl_parser \
target/doc/snowcap_main \
target/doc/snowcap_runtime \
target/doc/gns3
RUSTDOCFLAGS="--html-in-header katex-header.html" cargo doc --no-deps --all-features || exit 1
# generate the static webpage
cd website
hugo -D
cd ..
# copy over the static webpage
if [ -d "taget/doc/public" ]; then
echo "removing the old static webpage"
rm -rf target/doc/public
fi
echo "copying the new static webpage"
cp -r website/public target/doc/
# setup the index page
echo '<meta http-equiv="refresh" content="0; url=public/index.html">' > target/doc/index.html
# send the data to the server
rsync -avr -e ssh --delete target/doc/ web_snowcap@virt07.ethz.ch:public_html