This commit updates the `build.sh` and `preview.sh` scripts to the state they are in upstream at pagure.io/fedora-docs/template. Signed-off-by: Justin W. Flory (he/him) [Red Hat] <jwf@redhat.com>
23 lines
835 B
Bash
Executable file
23 lines
835 B
Bash
Executable file
#!/bin/sh
|
|
|
|
echo ""
|
|
echo "The preview is available at http://localhost:8080"
|
|
echo ""
|
|
echo "Spaces:"
|
|
echo " * Project ........ http://localhost:8080/project/"
|
|
echo " * Council ........ http://localhost:8080/council/"
|
|
echo " * Engineering .... http://localhost:8080/engineering/"
|
|
echo " * Mindshare ...... http://localhost:8080/mindshare/"
|
|
|
|
if [ "$(uname)" = "Darwin" ]; then
|
|
# Running on macOS.
|
|
# Let's assume that the user has the Docker CE installed
|
|
# which doesn't require a root password.
|
|
docker run --rm -v "$(pwd):/antora:ro" -v "$(pwd)/nginx.conf:/etc/nginx/conf.d/default.conf:ro" -p 8080:80 nginx
|
|
|
|
elif [ "$(expr substr "$(uname -s)" 1 5)" = "Linux" ]; then
|
|
# Running on Linux.
|
|
# Fedora Workstation has python3 installed as a default, so using that
|
|
cd ./public
|
|
python3 -m http.server 8080
|
|
fi
|