Allow spaces in yaml

This commit is contained in:
Alexandre
2021-12-01 22:23:56 +01:00
parent 7a4d22d85f
commit 9e63a4ff1f
2 changed files with 6 additions and 4 deletions

View File

@@ -63,7 +63,8 @@ function parse_yaml {
# Get variables and export
bashio::log.info "Starting the app with the variables in $CONFIGSOURCE"
for word in $(parse_yaml "$CONFIGSOURCE" ""); do
eval parse_yaml "$CONFIGSOURCE" "" >listtmp
cat listtmp | while read word || [[ -n $word ]]; do
# Clean output
word=${word//[\"\']/}
# Data validation
@@ -77,4 +78,4 @@ for word in $(parse_yaml "$CONFIGSOURCE" ""); do
fi
# Color text
sed -i "1a echo \$(tput setaf 2)Exporting ENV variables :\$(tput setaf 0)" /etc/services.d/*/run # Show text in colour
done
done && rm listtmp

View File

@@ -63,7 +63,8 @@ function parse_yaml {
# Get variables and export
bashio::log.info "Starting the app with the variables in $CONFIGSOURCE"
for word in $(parse_yaml "$CONFIGSOURCE" ""); do
eval parse_yaml "$CONFIGSOURCE" "" >listtmp
cat listtmp | while read word || [[ -n $word ]]; do
# Clean output
word=${word//[\"\']/}
# Data validation
@@ -77,4 +78,4 @@ for word in $(parse_yaml "$CONFIGSOURCE" ""); do
fi
# Color text
sed -i "1a echo \$(tput setaf 2)Exporting ENV variables :\$(tput setaf 0)" /etc/services.d/*/run # Show text in colour
done
done && rm listtmp