From c738466cd84db0535fc9c0d787fee4a7f242dcee Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sun, 15 Jun 2025 10:02:54 -0500 Subject: [PATCH] Restored support for downloading specific versions (#528) --- bedrock-entry.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bedrock-entry.sh b/bedrock-entry.sh index 92a4d7d..c8f6ccb 100755 --- a/bedrock-entry.sh +++ b/bedrock-entry.sh @@ -23,8 +23,7 @@ function replace_version_in_url() { function lookupVersion() { platform=${1:?Missing required platform indicator} - # TODO need to find out API call to lookup custom version - # customVersion=${2:-} + customVersion=${2:-} DOWNLOAD_URL=$( curl -fsSL "${getUrlPage}" | @@ -48,6 +47,11 @@ function lookupVersion() { ' ) + if [[ -n "${customVersion}" && -n "${DOWNLOAD_URL}" ]]; then + DOWNLOAD_URL=$(replace_version_in_url "${DOWNLOAD_URL}" "${customVersion}") + return + fi + # shellcheck disable=SC2012 if [[ ${DOWNLOAD_URL} =~ http.*/.*-(.*)\.zip ]]; then VERSION=${BASH_REMATCH[1]}