Update 99-run.sh

This commit is contained in:
Alexandre
2021-12-02 16:23:21 +01:00
committed by GitHub
parent eba138376c
commit 986b3f6be6

View File

@@ -71,10 +71,15 @@ do
line=${line//[\"\']/} line=${line//[\"\']/}
# Check if secret # Check if secret
if [[ "${line}" == *'!secret '* ]]; then if [[ "${line}" == *'!secret '* ]]; then
echo "line : $line"
secret=${line#*secret } secret=${line#*secret }
echo "secret : $secret"
secret=$(sed -n "/$secret/p" /config/secrets.yaml) secret=$(sed -n "/$secret/p" /config/secrets.yaml)
echo "secret : $secret"
secret=${secret#*: } secret=${secret#*: }
echo "secret : $secret"
line="${line%%=*}=$secret" line="${line%%=*}=$secret"
echo "line : $line"
fi fi
# Data validation # Data validation
if [[ $line =~ ^.+[=].+$ ]]; then if [[ $line =~ ^.+[=].+$ ]]; then