Skip to content

Commit c738466

Browse files
authored
Restored support for downloading specific versions (#528)
1 parent 406ac6d commit c738466

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

bedrock-entry.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ function replace_version_in_url() {
2323

2424
function lookupVersion() {
2525
platform=${1:?Missing required platform indicator}
26-
# TODO need to find out API call to lookup custom version
27-
# customVersion=${2:-}
26+
customVersion=${2:-}
2827

2928
DOWNLOAD_URL=$(
3029
curl -fsSL "${getUrlPage}" |
@@ -48,6 +47,11 @@ function lookupVersion() {
4847
'
4948
)
5049

50+
if [[ -n "${customVersion}" && -n "${DOWNLOAD_URL}" ]]; then
51+
DOWNLOAD_URL=$(replace_version_in_url "${DOWNLOAD_URL}" "${customVersion}")
52+
return
53+
fi
54+
5155
# shellcheck disable=SC2012
5256
if [[ ${DOWNLOAD_URL} =~ http.*/.*-(.*)\.zip ]]; then
5357
VERSION=${BASH_REMATCH[1]}

0 commit comments

Comments
 (0)