mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-23 13:06:28 +01:00
Allow blanks in additional apps
https://github.com/alexbelgium/hassio-addons/issues/411
This commit is contained in:
@@ -14,11 +14,15 @@ fi
|
|||||||
# Install specific apps
|
# Install specific apps
|
||||||
if bashio::config.has_value 'additional_apps'; then
|
if bashio::config.has_value 'additional_apps'; then
|
||||||
bashio::log.info "Installing additional apps :"
|
bashio::log.info "Installing additional apps :"
|
||||||
# hadolint ignore=SC2005
|
NEWAPPS="$(bashio::config 'additional_apps')"
|
||||||
NEWAPPS=$(bashio::config 'additional_apps')
|
IFS=","
|
||||||
for APP in ${NEWAPPS//,/ }; do
|
re='^( *).*'
|
||||||
bashio::log.green "... $APP"
|
read -ra array <<< "$NEWAPPS"
|
||||||
# shellcheck disable=SC2015
|
for element in "${array[@]}"
|
||||||
apk add --no-cache "$APP" >/dev/null || bashio::log.red "... not successful, please check package name"
|
do
|
||||||
|
APP="${element#${BASH_REMATCH[1]}}"
|
||||||
|
[[ $element =~ $re ]] && \
|
||||||
|
bashio::log.green "... $APP" && \
|
||||||
|
apk add --no-cache "$APP" || bashio::log.red "... not successful, please check $APP package name"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user