Skip to content

Commit 1319f8b

Browse files
Add Doc shell script
1 parent 2b10cd1 commit 1319f8b

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

docs/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ it is expected to replace various mediums like:
1515

1616
```bash
1717
pip install sphinx sphinx-design sphinxawesome-theme
18-
make html
18+
chmod a+x make.sh
19+
./make.sh html
1920
```
2021

2122
That's it! You can view the documentation under `./build/html/index.html` in your browser.

docs/make.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/sh
2+
3+
# Command file for Sphinx documentation
4+
5+
if [ -z "$SPHINXBUILD" ]; then
6+
SPHINXBUILD=sphinx-build
7+
fi
8+
SOURCEDIR=source
9+
BUILDDIR=build
10+
11+
$SPHINXBUILD > /dev/null 2>&1
12+
if [ $? -eq 127 ]; then
13+
echo
14+
echo "The 'sphinx-build' command was not found. Make sure you have Sphinx"
15+
echo "installed, then set the SPHINXBUILD environment variable to point"
16+
echo "to the full path of the 'sphinx-build' executable. Alternatively you"
17+
echo "may add the Sphinx directory to PATH."
18+
echo
19+
echo "If you don't have Sphinx installed, grab it from"
20+
echo "https://www.sphinx-doc.org/"
21+
exit 1
22+
fi
23+
24+
if [ -z "$1" ]; then
25+
$SPHINXBUILD -M help $SOURCEDIR $BUILDDIR $SPHINXOPTS $O
26+
exit 0
27+
fi
28+
29+
$SPHINXBUILD -M "$1" $SOURCEDIR $BUILDDIR $SPHINXOPTS $O

0 commit comments

Comments
 (0)