Skip to content

Commit 833675f

Browse files
fix(zulu): improve regex to ignore ZRE links (#90)
1 parent e8d0b7b commit 833675f

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

bin/zulu.bash

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,13 @@ REGEX='s/^zulu([0-9+_.]{2,})-(?:(ca-crac|ca-fx-dbg|ca-fx|ca-hl|ca-dbg|ea-cp3|ca|
5757
INDEX_FILE="${TEMP_DIR}/index.html"
5858
download_file 'https://static.azul.com/zulu/bin/' "${INDEX_FILE}"
5959

60-
ZULU_FILES=$(grep -o -E '<a href=".*/(zulu.+-(linux|macosx|win|solaris)_(musl_x64|musl_aarch64|x64|i686|aarch32hf|aarch32sf|aarch64|ppc64|sparcv9)\.(tar\.gz|zip|msi|dmg))">' "${INDEX_FILE}" | perl -pe 's#<a href=".*/(zulu[^/]+)">#$1#g' | sort -V)
60+
ZULU_FILES=$(grep -o -E '<a href=".*/(zulu[0-9]+.+-(linux|macosx|win|solaris)_(musl_x64|musl_aarch64|x64|i686|aarch32hf|aarch32sf|aarch64|ppc64|sparcv9)\.(tar\.gz|zip|msi|dmg))">' "${INDEX_FILE}" | perl -pe 's#<a href=".*/(zulu[^/]+)">#$1#g' | sort -V)
6161
for ZULU_FILE in ${ZULU_FILES}
6262
do
6363
METADATA_FILE="${METADATA_DIR}/${ZULU_FILE}.json"
6464
ZULU_ARCHIVE="${TEMP_DIR}/${ZULU_FILE}"
6565
ZULU_URL="https://static.azul.com/zulu/bin/${ZULU_FILE}"
66-
if [[ "${ZULU_FILE}" == *"zre"* ]]
67-
then
68-
echo "Ignoring ${ZULU_FILE}"
69-
elif [[ -f "${METADATA_FILE}" ]]
66+
if [[ -f "${METADATA_FILE}" ]]
7067
then
7168
echo "Skipping ${ZULU_FILE}"
7269
else

0 commit comments

Comments
 (0)