This repository was archived by the owner on Oct 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Populate S3 with JDKs
Dennis Hoer edited this page Oct 25, 2017
·
18 revisions
Downloads JDK from Oracle and pushes them with read permissions to a S3 bucket that is configured for Website Hosting.
VERSION=9.0.1
BUILD=11
jdks=("jdk-$VERSION_macosx-x64_bin.dmg" "jdk-$VERSION_windows-x64_bin.exe" "jdk-$VERSION_linux-x64_bin.tar.gz")
for jdk in "${jdks[@]}"
do
curl --create-dirs -L --retry 2 --retry-delay 2 --cookie "oraclelicense=accept-securebackup-cookie;gpw_e24=http://edelivery.oracle.com" http://download.oracle.com/otn-pub/java/jdk/$VERSION+$BUILD/$jdk -o $jdk --connect-timeout 30
aws s3 cp $jdk s3://mybucket/java --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
doneVERSION=8u152
BUILD=16
HASH=aa0333dd3019491ca4f6ddbe78cdb6d0
jdks=("jdk-$VERSION-macosx-x64.dmg" "jdk-$VERSION-windows-x64.exe" "jdk-$VERSION-windows-i586.exe" "jdk-$VERSION-linux-x64.tar.gz" "jdk-$VERSION-linux-i586.tar.gz")
for jdk in "${jdks[@]}"
do
curl --create-dirs -L --retry 2 --retry-delay 2 --cookie "oraclelicense=accept-securebackup-cookie;gpw_e24=http://edelivery.oracle.com" http://download.oracle.com/otn-pub/java/jdk/$VERSION-b$BUILD/$HASH/$jdk -o $jdk --connect-timeout 30
aws s3 cp $jdk s3://mybucket/java --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
done