Skip to content

Instantly share code, notes, and snippets.

@paulbrodner
Created February 28, 2018 09:13
Show Gist options
  • Select an option

  • Save paulbrodner/ad6734b4a02f77a9bc0091fa2eb8da36 to your computer and use it in GitHub Desktop.

Select an option

Save paulbrodner/ad6734b4a02f77a9bc0091fa2eb8da36 to your computer and use it in GitHub Desktop.
export DOWNLOADPAGE=$(curl http://www.oracle.com/technetwork/java/javase/downloads/index.html | grep server-jre9-downloads | sed 's/.*\(server-jre9-downloads-[[:digit:]]*.html\).*/\1/')
export DOWNLOADURL=$(curl -b "oraclelicense=accept-securebackup-cookie" http://www.oracle.com/technetwork/java/javase/downloads/$DOWNLOADPAGE | grep _linux-x64_bin.tar.gz | sed 's/.*\(http:\/\/download.oracle.com.*serverjre.*_linux-x64_bin.tar.gz\).*/\1/')
curl -L -C - -b "oraclelicense=accept-securebackup-cookie" -O $DOWNLOADURL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment