2020-09-09 08:49:06 -05:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2021-02-08 07:25:42 -05:00
|
|
|
log() {
|
|
|
|
echo "[$(date +%Y-%m-%dT%H:%M:%S%:z)] $*"
|
|
|
|
}
|
|
|
|
|
|
|
|
#########################################
|
|
|
|
## App Frontend config
|
|
|
|
#########################################
|
|
|
|
|
2021-06-15 10:24:00 -05:00
|
|
|
update_flags() {
|
2021-09-16 04:33:40 -05:00
|
|
|
if [ -n "$PENPOT_FLAGS" ]; then
|
2021-06-15 10:24:00 -05:00
|
|
|
sed -i \
|
2021-09-16 04:33:40 -05:00
|
|
|
-e "s|^//var penpotFlags = .*;|var penpotFlags = \"$PENPOT_FLAGS\";|g" \
|
2021-06-15 10:24:00 -05:00
|
|
|
"$1"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
update_flags /var/www/app/js/config.js
|
2020-09-09 08:49:06 -05:00
|
|
|
exec "$@";
|