fix: add case for missing mkdocs-patch.yml file

This commit is contained in:
Glenn Y. Rolland 2022-01-30 17:14:57 +01:00
parent b67e4c735e
commit 468783f50e

View file

@ -31,14 +31,17 @@ chown -R "$EXT_UID:$EXT_GID" .marp
chown -R "$EXT_UID:$EXT_GID" /home/appuser chown -R "$EXT_UID:$EXT_GID" /home/appuser
# Patch mkdocs configuration # Patch mkdocs configuration
# set -x
if [ -f mkdocs-patch.yml ]; then if [ -f mkdocs-patch.yml ]; then
yq \ # bash
eval-all \ yq eval-all '. as $item ireduce ({}; . * $item)' \
'. as $item ireduce ({}; . * $item)' \
mkdocs-source.yml \ mkdocs-source.yml \
mkdocs-patch.yml \ mkdocs-patch.yml \
> mkdocs.yml > mkdocs.yml
else
cp mkdocs-patch.yml mkdocs.yml
fi fi
# set +x
if [ "$1" = "shell" ]; then if [ "$1" = "shell" ]; then
exec bash exec bash