forked from ExpressionEngine/ExpressionEngine-User-Guide
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheetools
More file actions
executable file
·35 lines (32 loc) · 1.02 KB
/
eetools
File metadata and controls
executable file
·35 lines (32 loc) · 1.02 KB
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
#!/bin/bash
# Open a prompt on the Docker container to fiddle
if [ "$1" == "prompt" ]; then
docker run -t -i -p 8080:80 -v $(pwd):/app ellislab/sphinx /bin/bash
elif [ "$1" == "createcontainer" ]; then
docker build -t ellislab/sphinx .
elif [ "$1" == "make" ]; then
shift
CLEAN=false
while getopts ":c" opt; do
case $opt in
c)
CLEAN=true
;;
\?)
echo "Invalid option: -$OPTARG" >&2
;;
esac
done
if [ "$CLEAN" == true ]; then
rm -rf ./build/*
fi
docker run --rm -it -v $(pwd):/docs/ ellislab/sphinx make html
elif [ "$1" == "build" ]; then
docker run --rm -i -v $(pwd):/docs/ ellislab/sphinx make html
else
echo "Usage: ./eetools <target> where <target> is one of:"
echo " createcontainer to create the Docker container (required first)"
echo " make [-c] to build the docs, optionally clean to build from scratch"
echo " build used by our appplication build script, runs without tty"
echo " prompt to open a prompt on the Docker container"
fi