mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-10 09:51:02 +01:00
hopefully fixed EOL...
This commit is contained in:
6
.github/.gitattributes
vendored
Normal file
6
.github/.gitattributes
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# Set the default behavior, in case people don't have core.autocrlf set.
|
||||||
|
* text eol=lf
|
||||||
|
|
||||||
|
# Denote all files that are truly binary and should not be modified.
|
||||||
|
*.png binary
|
||||||
|
*.jpg binary
|
||||||
@@ -9,8 +9,8 @@ echo "Starting..."
|
|||||||
for SCRIPTS in /scripts/*; do
|
for SCRIPTS in /scripts/*; do
|
||||||
[ -e "$SCRIPTS" ] || continue
|
[ -e "$SCRIPTS" ] || continue
|
||||||
echo "$SCRIPTS: executing"
|
echo "$SCRIPTS: executing"
|
||||||
chown $(id -u):$(id -g) $SCRIPTS
|
chown "$(id -u)":"$(id -g)" "$SCRIPTS"
|
||||||
chmod a+x $SCRIPTS
|
chmod a+x "$SCRIPTS"
|
||||||
sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' $SCRIPTS || true
|
sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS" || true
|
||||||
/./$SCRIPTS || echo "$SCRIPTS: exiting $?"
|
/./"$SCRIPTS" || echo "$SCRIPTS: exiting $?"
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ fi
|
|||||||
|
|
||||||
# Check if yaml is valid
|
# Check if yaml is valid
|
||||||
EXIT_CODE=0
|
EXIT_CODE=0
|
||||||
yamllint -d relaxed $CONFIGSOURCE &>ERROR || EXIT_CODE=$?
|
yamllint -d relaxed "$CONFIGSOURCE" &>ERROR || EXIT_CODE=$?
|
||||||
if [ $EXIT_CODE = 0 ]; then
|
if [ $EXIT_CODE = 0 ]; then
|
||||||
echo "Config file is a valid yaml"
|
echo "Config file is a valid yaml"
|
||||||
else
|
else
|
||||||
@@ -73,7 +73,7 @@ while IFS= read -r line; do
|
|||||||
secret=${line#*secret }
|
secret=${line#*secret }
|
||||||
# Check if single match
|
# Check if single match
|
||||||
secretnum=$(sed -n "/$secret:/=" /config/secrets.yaml)
|
secretnum=$(sed -n "/$secret:/=" /config/secrets.yaml)
|
||||||
[[ $(echo "$secretnum") == *' '* ]] && bashio::exit.nok "There are multiple matches for your password name. Please check your secrets.yaml file"
|
[[ $("$secretnum") == *' '* ]] && bashio::exit.nok "There are multiple matches for your password name. Please check your secrets.yaml file"
|
||||||
# Get text
|
# Get text
|
||||||
secret=$(sed -n "/$secret:/p" /config/secrets.yaml)
|
secret=$(sed -n "/$secret:/p" /config/secrets.yaml)
|
||||||
secret=${secret#*: }
|
secret=${secret#*: }
|
||||||
|
|||||||
Reference in New Issue
Block a user