mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-08-01 02:40:31 +02:00
Update 99-run.sh
This commit is contained in:
@@ -26,13 +26,19 @@ chmod -R 777 "$CONFIG_HOME"
|
|||||||
|
|
||||||
# Export variables
|
# Export variables
|
||||||
set -a
|
set -a
|
||||||
cp /./"$CONFIG_HOME"/config.env /config.env
|
echo ""
|
||||||
|
bashio::log.info "Getting variables from $CONFIG_HOME/config.env"
|
||||||
|
cp "$CONFIG_HOME"/config.env /config.env
|
||||||
# Remove previous instance
|
# Remove previous instance
|
||||||
sed -i "s|export ||g" /config.env
|
sed -i "s|export ||g" /config.env
|
||||||
# Add export for non empty lines
|
# Add export for non empty lines
|
||||||
sed -i '/\S/s/^/export /' /config.env
|
sed -i '/\S/s/^/export /' /config.env
|
||||||
# Delete lines starting with #
|
# Delete lines starting with #
|
||||||
sed -i '/export #/d' /config.env
|
sed -i '/export #/d' /config.env
|
||||||
|
# Show what is exported
|
||||||
|
while IFS= read -r line; do
|
||||||
|
bashio::log.blue "${line#"export "}"
|
||||||
|
done < /config.env
|
||||||
# Get variables
|
# Get variables
|
||||||
# shellcheck source=/dev/null
|
# shellcheck source=/dev/null
|
||||||
source /config.env
|
source /config.env
|
||||||
|
|||||||
Reference in New Issue
Block a user