Skip to content

Instantly share code, notes, and snippets.

@miuirussia
Created July 18, 2018 16:37
Show Gist options
  • Select an option

  • Save miuirussia/72dc879fd533c051e4101df01831d942 to your computer and use it in GitHub Desktop.

Select an option

Save miuirussia/72dc879fd533c051e4101df01831d942 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -euo pipefail
wget --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" \
$(curl -s http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html | \
awk "/downloads\['/ && ! /demos/ && /\['files'\]/ && /linux-x64/ && /\.tar\.gz/" | \
grep -o 'http.*\.tar\.gz'\
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment