flexiondotorg/oab-java6 — comment on commit 1f84a69d8e5e24c7dc2765d333e1ef78b3adfe9a
File: oab-java6.sh line 273
By flexiondotorg:

Hi,

Thanks for the info. I came up with a similar solution yesterday :-) I'll review your idea more closely next week and release a new version that is entirely dynamic.

Mikko Rantalainen wrote:

>How about something like this:
>
> JAVA_VER="6"
>RELEASE_PAGE_URL=$(wget -qO-
>"http://www.oracle.com/technetwork/java/javase/downloads/index.html" |
>perl -ne 'if
>(m@/technetwork/java/javase/downloads/jdk-6u[0-9]+-download-[0-9]+.html@)
>{
>s@.*(/technetwork/java/javase/downloads/jdk-6u[0-9]+-download-[0-9]+.html).*@http://www.oracle.com$1@;
>print}')
>JAVA_UPD=$(wget -qO- "$RELEASE_PAGE_URL" | perl -ne 'if
>(m@http://download.oracle.com/otn-pub/java/jdk/6u[0-9]+-b[0-9]+/jdk-6u[0-9]+-linux-i586.bin@)
>{
>s@.*http://download.oracle.com/otn-pub/java/jdk/6u([0-9]+)-b[0-9]+/jdk-6u[0-9]+-linux-i586.bin.*@$1@;
>print}')
>JAVA_REL=$(wget -qO- "$RELEASE_PAGE_URL" | perl -ne 'if
>(m@http://download.oracle.com/otn-pub/java/jdk/6u[0-9]+-b[0-9]+/jdk-6u[0-9]+-linux-i586.bin@)
>{
>s@.*http://download.oracle.com/otn-pub/java/jdk/6u[0-9]+-(b[0-9]+)/jdk-6u[0-9]+-linux-i586.bin.*@$1@;
>print}')
>
>(Sorry for the long lines and poor performance because of not using
>temporary files...)
>
>---
>Reply to this email directly or view it on GitHub:
>https://github.com/flexiondotorg/oab-java6/commit/1f84a69d8e5e24c7dc2765d333e1ef78b3adfe9a#commitcomment-977730

--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.