mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-15 13:21:50 +02:00
Allow spaces in yaml
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user