-
Notifications
You must be signed in to change notification settings - Fork 29
/
build.sh
executable file
·35 lines (27 loc) · 980 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
34
35
#!/usr/bin/env bash
# Remove themes symlink to themes to prevent error messages while building
rm -rf html/themes;
# Trick daux.io into thinking there's a zip file it can link to
if [ ! -f modmore-documentation.zip ];
then
touch modmore-documentation.zip;
fi
# Generate the docs using daux.io
if php vendor/bin/daux generate --source=. --destination=html ; then
# Remove the empty placeholder file from the generated html folder
if [ -f html/modmore-documentation.zip ];
then
rm html/modmore-documentation.zip;
fi
# Generate a zip file containing the complete static site, placing it inside the html folder again
#zip -r html/modmore-documentation.zip html
else
echo "Failed generating documentation";
exit 1;
fi
echo "Symlinking html/themes to themes/";
# Remove themes folder (generated by daux.io)
rm -rf html/themes;
# Create symlink to central themes folder
cd html; ln -s ../themes/ themes; cd ..;
echo "Build complete!";