alfresco-content-app/docker/docker-entrypoint.d/30-sed-on-app-extensions.sh
Denys Vuika 0ed0a10471
disable about and settings by default (#1868)
* disable about and settings by default

* support docker variables

* remove comments
2020-12-09 12:30:53 +00:00

16 lines
487 B
Bash
Executable File

#!/bin/sh
set -e
echo Running sed on "${NGINX_ENVSUBST_OUTPUT_DIR}/assets/app.extensions.json"
# modifies the "$ignoreReferenceList" property using a comma-delimited string
if [ -n "${APP_EXTENSIONS_IGNORE_REFS}" ]; then
echo "replace APP_EXTENSIONS_IGNORE_REFS"
replace="\/"
encoded=${APP_EXTENSIONS_IGNORE_REFS//\//$replace}
sed -e "s/\"$ignoreReferenceList\": \".*\"/\"$ignoreReferenceList\": \[${encoded}\]/g" \
-i "${NGINX_ENVSUBST_OUTPUT_DIR}/app.extensions.json"
fi