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