Skip to content

Commit

Permalink
Relax regex to catch EA, RC and GA jdk uris
Browse files Browse the repository at this point in the history
  • Loading branch information
sormuras committed Mar 20, 2019
1 parent b11b060 commit 132f607
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion install-jdk.sh
Expand Up @@ -207,7 +207,7 @@ function determine_url() {
# EA or RC build?
local JAVA_NET="http://jdk.java.net/${feature}"
local candidates=$(wget --quiet --output-document - ${JAVA_NET} | grep -Eo 'href[[:space:]]*=[[:space:]]*"[^\"]+"' | grep -Eo '(http|https)://[^"]+')
url=$(echo "${candidates}" | grep -Eo "${DOWNLOAD}/.+/jdk${feature}/.+/${license}/.*jdk-${feature}.+${os}_bin.tar.gz$" || true)
url=$(echo "${candidates}" | grep -Eo "${DOWNLOAD}/.+/jdk${feature}/.*${license}/.*jdk-${feature}.+${os}_bin.tar.gz$" || true)

if [[ -z ${url} ]]; then
script_exit "Couldn't determine a download url for ${feature}-${license} on ${os}" 1
Expand Down

0 comments on commit 132f607

Please sign in to comment.