2018-07-28 11:15:24 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
2022-01-12 19:02:50 +01:00
|
|
|
if [ "$(uname)" = "Darwin" ]; then
|
2018-07-28 11:15:24 +02:00
|
|
|
# Running on macOS.
|
|
|
|
|
# Let's assume that the user has the Docker CE installed
|
|
|
|
|
# which doesn't require a root password.
|
2019-09-16 16:27:14 +02:00
|
|
|
echo "The preview will be available at http://localhost:8080/"
|
2022-03-03 10:24:36 +01:00
|
|
|
docker run --rm -v "$(pwd):/antora:ro" -v "$(pwd)/nginx.conf:/etc/nginx/conf.d/default.conf:ro" -p 8080:80 nginx
|
2018-07-28 11:15:24 +02:00
|
|
|
|
2022-01-12 19:02:50 +01:00
|
|
|
elif [ "$(expr substr "$(uname -s)" 1 5)" = "Linux" ]; then
|
2018-07-28 11:15:24 +02:00
|
|
|
# Running on Linux.
|
2019-09-17 14:12:08 +02:00
|
|
|
# Fedora Workstation has python3 installed as a default, so using that
|
|
|
|
|
echo ""
|
|
|
|
|
echo "The preview is available at http://localhost:8080"
|
|
|
|
|
echo ""
|
|
|
|
|
cd ./public
|
|
|
|
|
python3 -m http.server 8080
|
2018-07-28 11:15:24 +02:00
|
|
|
fi
|