From 2d614f46360272f36c27a541518c05611613589b Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 26 Apr 2022 22:51:41 +0200 Subject: [PATCH] Update 99-run.sh --- addons_updater/rootfs/etc/cont-init.d/99-run.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/addons_updater/rootfs/etc/cont-init.d/99-run.sh b/addons_updater/rootfs/etc/cont-init.d/99-run.sh index fc95754c9a..c7f8307fc8 100644 --- a/addons_updater/rootfs/etc/cont-init.d/99-run.sh +++ b/addons_updater/rootfs/etc/cont-init.d/99-run.sh @@ -48,12 +48,18 @@ LOGINFO="... parse addons" && if [ "$VERBOSE" = true ]; then bashio::log.info "$ # Go through all folders, add to filters if not existing echo "go in folder" -cd /data/"$BASENAME" || true +cd /data/"$BASENAME" || exit for f in *; do echo "$f" if [ -f "$f"/updater.json ]; then SLUG=$f + # Rebase + LOGINFO="... updating ${REPOSITORY}" && if [ "$VERBOSE" = true ]; then bashio::log.info "$LOGINFO"; fi + cd "/data/$BASENAME" || exit + git pull --rebase &>/dev/null || git reset --hard &>/dev/null + git pull --rebase &>/dev/null + #Define the folder addon LOGINFO="... $SLUG : checking slug exists in repo" && if [ "$VERBOSE" = true ]; then bashio::log.info "$LOGINFO"; fi cd /data/"${BASENAME}"/"${SLUG}" || { bashio::log.error "$SLUG addon not found in this repository. Exiting."; continue; }