Restored support for downloading specific versions (#528)
This commit is contained in:
1 parent
406ac6d773
commit
c738466cd8
1 file changed
+6
-2
+6
-2
@@ -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]}
|
||||
|
||||
Reference in new issue
Block a user