hopefully fixed EOL...

This commit is contained in:
Bruvv
2022-01-01 11:21:36 +01:00
parent c210d8eee5
commit f85167c4ca
3 changed files with 12 additions and 6 deletions

6
.github/.gitattributes vendored Normal file
View 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

View File

@@ -9,8 +9,8 @@ echo "Starting..."
for SCRIPTS in /scripts/*; do
[ -e "$SCRIPTS" ] || continue
echo "$SCRIPTS: executing"
chown $(id -u):$(id -g) $SCRIPTS
chmod a+x $SCRIPTS
sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' $SCRIPTS || true
/./$SCRIPTS || echo "$SCRIPTS: exiting $?"
chown "$(id -u)":"$(id -g)" "$SCRIPTS"
chmod a+x "$SCRIPTS"
sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS" || true
/./"$SCRIPTS" || echo "$SCRIPTS: exiting $?"
done

View File

@@ -30,7 +30,7 @@ fi
# Check if yaml is valid
EXIT_CODE=0
yamllint -d relaxed $CONFIGSOURCE &>ERROR || EXIT_CODE=$?
yamllint -d relaxed "$CONFIGSOURCE" &>ERROR || EXIT_CODE=$?
if [ $EXIT_CODE = 0 ]; then
echo "Config file is a valid yaml"
else
@@ -73,7 +73,7 @@ while IFS= read -r line; do
secret=${line#*secret }
# Check if single match
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
secret=$(sed -n "/$secret:/p" /config/secrets.yaml)
secret=${secret#*: }