Skip to content

Commit 4bce597

Browse files
authored
Fix missing recent Oracle/GraalVM GA versions (#57)
* Fix conditional to skip downloading Oracle/GraalVM JDKs * Skipping non-existing URLs Fixes #52
1 parent e6ceca0 commit 4bce597

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

bin/oracle-graalvm.bash

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ function download_and_parse {
6565

6666
for JDK_FILE in ${JDK_FILES} ${JDK_FILES_CURRENT}
6767
do
68-
if [[ -n "${JDK_FILE}" ]]
68+
if [[ -z "${JDK_FILE}" ]]
6969
then
7070
continue
7171
fi
@@ -77,7 +77,11 @@ function download_and_parse {
7777
then
7878
echo "Skipping ${JDK_FILE}"
7979
else
80-
download_file "${JDK_URL}" "${JDK_ARCHIVE}"
80+
if ! download_file "${JDK_URL}" "${JDK_ARCHIVE}";
81+
then
82+
echo "Failed to download ${JDK_FILE}, skipping"
83+
continue
84+
fi
8185
VERSION=""
8286
OS=""
8387
ARCH=""

bin/oracle.bash

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function download_and_parse {
6767

6868
for JDK_FILE in ${JDK_FILES} ${JDK_FILES_CURRENT}
6969
do
70-
if [[ -n "${JDK_FILE}" ]]
70+
if [[ -z "${JDK_FILE}" ]]
7171
then
7272
continue
7373
fi
@@ -79,7 +79,11 @@ function download_and_parse {
7979
then
8080
echo "Skipping ${JDK_FILE}"
8181
else
82-
download_file "${JDK_URL}" "${JDK_ARCHIVE}"
82+
if ! download_file "${JDK_URL}" "${JDK_ARCHIVE}";
83+
then
84+
echo "Failed to download ${JDK_FILE}, skipping"
85+
continue
86+
fi
8387
VERSION=""
8488
OS=""
8589
ARCH=""

0 commit comments

Comments
 (0)