From f85167c4caf510875cccbb24cec0bae66711cf5f Mon Sep 17 00:00:00 2001 From: Bruvv Date: Sat, 1 Jan 2022 11:21:36 +0100 Subject: [PATCH] hopefully fixed EOL... --- .github/.gitattributes | 6 ++++++ whoogle/rootfs/entrypoint.sh | 8 ++++---- whoogle/rootfs/scripts/90-config_yaml.sh | 4 ++-- 3 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 .github/.gitattributes diff --git a/.github/.gitattributes b/.github/.gitattributes new file mode 100644 index 000000000..93c0e783b --- /dev/null +++ b/.github/.gitattributes @@ -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 \ No newline at end of file diff --git a/whoogle/rootfs/entrypoint.sh b/whoogle/rootfs/entrypoint.sh index 06b1b88b5..ce3d8635f 100644 --- a/whoogle/rootfs/entrypoint.sh +++ b/whoogle/rootfs/entrypoint.sh @@ -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 diff --git a/whoogle/rootfs/scripts/90-config_yaml.sh b/whoogle/rootfs/scripts/90-config_yaml.sh index 50ee2f1a3..7e9202aff 100644 --- a/whoogle/rootfs/scripts/90-config_yaml.sh +++ b/whoogle/rootfs/scripts/90-config_yaml.sh @@ -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#*: }