mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 10:21:02 +01:00
Update 00-global_var.sh
This commit is contained in:
@@ -10,14 +10,14 @@ JSONSOURCE="/data/options.json"
|
||||
|
||||
# Export keys as env variables
|
||||
# echo "All addon options were exported as variables"
|
||||
mapfile -t arr < <(jq -r 'keys[]' ${JSONSOURCE})
|
||||
mapfile -t arr < <(jq -r 'keys[]' "${JSONSOURCE}")
|
||||
|
||||
for KEYS in "${arr[@]}"; do
|
||||
# export key
|
||||
VALUE=$(jq ."$KEYS" ${JSONSOURCE})
|
||||
VALUE=$(jq ."$KEYS" "${JSONSOURCE}")
|
||||
line="${KEYS}=${VALUE//[\"\']/}"
|
||||
# Use locally
|
||||
if bashio::config.false "verbose" || [[ "${KEYS}" == *"PASS"* ]]; then
|
||||
if bashio::config.false "verbose" || [[ "${KEYS}" == *"PASS"* ]]; then
|
||||
bashio::log.blue "${KEYS}=******"
|
||||
else
|
||||
bashio::log.blue "$line"
|
||||
|
||||
Reference in New Issue
Block a user