Skip to content

Commit

Permalink
build.sh: Fix overquoting for ${cmd}
Browse files Browse the repository at this point in the history
Fixes:
```
$ ./build.sh

This build script is using Podman to run the build in an isolated environment.

antora: option '--html-url-extension-style <choice>' argument 'indexify site.yml' is invalid. Allowed choices are default, drop, indexify.
```

See https://pagure.io/fedora-docs/template/pull-request/21
  • Loading branch information
travier authored and jlebon committed Feb 25, 2022
1 parent 6f0e2d7 commit bbf4e82
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if uname | grep -iwq darwin; then
echo ""
echo "This build script is using Docker container runtime to run the build in an isolated environment."
echo ""
docker run --rm -it -v "$(pwd):/antora" "${image}" "${cmd}"
docker run --rm -it -v "$(pwd):/antora" "${image}" ${cmd}

elif uname | grep -iq linux; then
# Running on Linux.
Expand All @@ -26,22 +26,22 @@ elif uname | grep -iq linux; then
echo ""
echo "This build script is using Podman to run the build in an isolated environment."
echo ""
podman run --rm -it -v "$(pwd):/antora:z" "${image}" "${cmd}"
podman run --rm -it -v "$(pwd):/antora:z" "${image}" ${cmd}

elif [ -f /usr/bin/docker ]; then
echo ""
echo "This build script is using Docker to run the build in an isolated environment."
echo ""

if groups | grep -wq "docker"; then
docker run --rm -it -v "$(pwd):/antora:z" "${image}" "${cmd}"
docker run --rm -it -v "$(pwd):/antora:z" "${image}" ${cmd}
else
echo "You might be asked for your password."
echo "You can avoid this by adding your user to the 'docker' group,"
echo "but be aware of the security implications."
echo "See https://docs.docker.com/install/linux/linux-postinstall/"
echo ""
sudo docker run --rm -it -v "$(pwd):/antora:z" "${image}" "${cmd}"
sudo docker run --rm -it -v "$(pwd):/antora:z" "${image}" ${cmd}
fi
else
echo ""
Expand Down

0 comments on commit bbf4e82

Please sign in to comment.