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
# Patch mkdocs configuration
# set -x
if [ -f mkdocs-patch.yml ]; then
yq \
eval-all \
'. as $item ireduce ({}; . * $item)' \
# bash
yq eval-all '. as $item ireduce ({}; . * $item)' \
mkdocs-source.yml \
mkdocs-patch.yml \
> mkdocs.yml
else
cp mkdocs-patch.yml mkdocs.yml
fi
# set +x
if [ "$1" = "shell" ]; then
exec bash