Fix 3rd party mods without tags (i.e. latest)

This commit is contained in:
thespad
2025-01-04 23:05:39 +00:00
parent 4816424158
commit 2c834e3aaf
+9 -4
View File
@@ -5,7 +5,7 @@
# Version 3 # Version 3
# 2022-09-25 - Initial Release # 2022-09-25 - Initial Release
MOD_SCRIPT_VER="3.20241231" MOD_SCRIPT_VER="3.20250104"
# Define custom folder paths # Define custom folder paths
SCRIPTS_DIR="/custom-cont-init.d" SCRIPTS_DIR="/custom-cont-init.d"
@@ -291,7 +291,7 @@ run_mods() {
# If "repo" name has . in it, then assume it's actually a registry with no repo # If "repo" name has . in it, then assume it's actually a registry with no repo
elif [[ ${DOCKER_MOD%%/*} =~ \. ]]; then elif [[ ${DOCKER_MOD%%/*} =~ \. ]]; then
REGISTRY="${DOCKER_MOD%%/*}" REGISTRY="${DOCKER_MOD%%/*}"
MOD="${DOCKER_MOD##*/}" DOCKER_MOD="${DOCKER_MOD##*/}"
fi fi
;; ;;
esac esac
@@ -317,9 +317,14 @@ run_mods() {
unset FULLTAG unset FULLTAG
TAG="${DOCKER_MOD#*:}" TAG="${DOCKER_MOD#*:}"
unset TAGSHA unset TAGSHA
fi else
if [[ "${TAG}" == "${DOCKER_MOD}" ]]; then # Mod has no tag
ENDPOINT="${DOCKER_MOD}"
USERNAME="${DOCKER_MOD%%/*}"
REPO="${ENDPOINT#*/}"
unset FULLTAG
TAG="latest" TAG="latest"
unset TAGSHA
fi fi
FILENAME="${USERNAME}.${REPO}${TAG:+.${TAG}}${TAGSHA:+.${TAGSHA#*:}}" FILENAME="${USERNAME}.${REPO}${TAG:+.${TAG}}${TAGSHA:+.${TAGSHA#*:}}"
MANIFEST_URL="https://${REGISTRY}/v2/${ENDPOINT}/manifests" MANIFEST_URL="https://${REGISTRY}/v2/${ENDPOINT}/manifests"