From: geraldo netto <geraldone...@gmail.com>
Committer: Waldemar Kozaczuk <jwkozac...@gmail.com>
Branch: master

improve url parsing for openjdk8-zulu-compact-common

for some reason the parsing of openjdk8 (zulu full and compact profiles) was broken so, based on [1] we first extract all <a href> elements and then we extract the latest version available

[1] https://stackoverflow.com/questions/1881237/easiest-way-to-extract-the-urls-from-an-html-page-using-sed-or-awk-only

Signed-off-by: geraldo netto <geraldone...@gmail.com>
Message-Id: <20180908011753.2073-2-geraldone...@gmail.com>

---
diff --git a/openjdk8-zulu-compact-common/latest.sh b/openjdk8-zulu-compact-common/latest.sh
--- a/openjdk8-zulu-compact-common/latest.sh
+++ b/openjdk8-zulu-compact-common/latest.sh
@@ -1,3 +1,3 @@
 #!/bin/bash

-wget -c -qO- http://www.azul.com/downloads/zulu/zulu-linux | grep "jdk8.*linux.*64.tar.gz\"" | grep -o "http:.*tar.gz" | head -1 +wget -c -qO- http://www.azul.com/downloads/zulu/zulu-linux | grep -o '<a href=['"'"'"][^"'"'"']*['"'"'"]' | grep "jdk8.*linux.*64.tar.gz\"" | cut -d'"' -f2 | head -1

--
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osv-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to