Update 99-run.sh

This commit is contained in:
Alexandre
2024-01-12 19:27:01 +01:00
committed by GitHub
parent acfae7938a
commit 4c97ab5502

View File

@@ -198,12 +198,10 @@ for f in */; do
else
LOGINFO="... $SLUG : beta is off" && if [ "$VERBOSE" = true ]; then bashio::log.info "$LOGINFO"; fi
fi
#Execute version search
# shellcheck disable=SC2086
LASTVERSION="$(lastversion "$UPSTREAM" $ARGUMENTS 2>&1)" || \
# If failure, checks if there is packages that could be used
{ if [[ "$SOURCE" == "github" ]] && [[ ${LASTVERSION,,} == *"no release found"* ]]; then
function test_packages () {
if [[ "$SOURCE" == "github" ]] && [[ ${LASTVERSION,,} == *"no release found"* ]]; then
# Is there a package
echo "No version found, looking if packages available"
last_packages="$(curl -s https://github.com/$REPOSITORY/packages | sed -n "s/.*\/container\/package\/\([^\"]*\).*/\1/p")" || true
@@ -232,6 +230,11 @@ for f in */; do
# Continue to next
continue
fi }
#Execute version search
# shellcheck disable=SC2086
LASTVERSION="$(lastversion "$UPSTREAM" $ARGUMENTS 2>&1 || test_packages)"
fi
# Add brackets