-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-entrypoint.sh
43 lines (37 loc) · 980 Bytes
/
docker-entrypoint.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
42
43
#!/bin/sh
set -e
usage() {
echo "Usage: command [options]"
echo
echo "where 'command' is one of:"
echo " - quickstart:"
echo " - sphinx-quickstart: Create a new documentation site (by default in /doc)"
echo " Execute 'sphinx-quickstart --help' for all command line options."
echo
echo " - make: Build the sphinx documentation."
echo " Execute 'make help' for a list of targets."
echo " This options is only valid if a sphinx doc exists."
}
command=${1:-help}
shift $(( $# > 0 ? 1 : 0 ))
case "$command" in
quickstart|sphinx-quickstart)
sphinx-quickstart \
--templatedir /etc/defaults/sphinx \
--makefile --use-make-mode --no-batchfile \
$@
;;
make)
if [[ -e "Makefile" ]]
then
make $@
else
echo "Sphinx documentation not found."
usage
exit 1
fi
;;
*)
usage
exit 1
esac