-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.sh
33 lines (24 loc) · 1020 Bytes
/
build.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
#!/bin/bash
echo "Welcome to WSOFTDocs!"
echo "Copyright © 2022 WSOFT All Rights Reserved."
echo;
echo "WSOFTDocs's build has a need to Python3,MkDocs,Lantana,CEI and its dependents."
echo "Moreover, You can build legal docs, but documents that aren't from WSOFT shall have no legal effect."
echo "To learn more about it, please check at https://docs.wsoft.ws/"
echo "If you are attempting to build on a non-x64 processor,"
echo "change the contents of this variable."
CEI_FILE_NAME="cei-linux-x64"
echo "CEI will use $CEI_FILE_NAME"
if !(type "pip3" > /dev/null 2>&1); then
echo "Pypl3 Doesn't exist! Install now."
apt install python3-pip
fi
if !(type "mkdocs" > /dev/null 2>&1); then
echo "MkDocs Doesn't exist! Install now."
. install.sh
fi
chmod +x ./tools/cei/$CEI_FILE_NAME
echo "Building the WSOFTDocs..."
export PYTHONPATH=.
mkdocs build --site-dir site && ./tools/cei/$CEI_FILE_NAME https://wsoft.ws/common/layout.html --min site
echo "Build completed. Please check /site directory."