diff options
author | Heikki Halmet <heikki.halmet@qt.io> | 2018-03-17 23:03:08 +0200 |
---|---|---|
committer | Tony Sarajärvi <tony.sarajarvi@qt.io> | 2018-03-19 11:57:09 +0000 |
commit | a6feaec2877d9089d9b9ba5c934b89a4de78de42 (patch) | |
tree | 4b65ad93286612e82c92a35f4861fbe4cdb50f97 | |
parent | 1b5f8cec03297af93150537cc3c8eb0bcd01f3fc (diff) |
Provisioning: Fix java installation for mac
Change-Id: I3b6672e671720416af71631c2f9ce814f07e596a
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
-rwxr-xr-x | coin/provisioning/common/macos/java.sh | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/coin/provisioning/common/macos/java.sh b/coin/provisioning/common/macos/java.sh index c70e779b..c5222a55 100755 --- a/coin/provisioning/common/macos/java.sh +++ b/coin/provisioning/common/macos/java.sh @@ -39,32 +39,23 @@ set -ex echo "Installing Java Development Kit" -url=http://ci-files01-hki.intra.qt.io/input/mac/jdk-8u102-macosx-x64.dmg -url_alt=http://download.oracle.com/otn-pub/java/jdk/8u102-b14/jdk-8u102-macosx-x64.dmg -targetFile=/tmp/jdk-8u102-macosx-x64.dmg -expectedSha1=1405af955f14e32aae187b5754a716307db22104 +targetFile=jdk-8u102-macosx-x64.dmg -echo "Downloading from primary URL '$url'" -curl --fail -L --retry 5 --retry-delay 5 -o "$targetFile" "$url" || ( - echo "Failed to download '$url' multiple times" - echo "Downloading file from alternative URL '$url_alt'" - curl --fail -L --retry 5 --retry-delay 5 -j -k -H "Cookie: oraclelicense=accept-securebackup-cookie" -o "$targetFile" "$url_alt" -) +url=ci-files01-hki.intra.qt.io:/hdd/www/input/mac +# url_alt=http://download.oracle.com/otn-pub/java/jdk/8u102-b14/jdk-8u102-macosx-x64.dmg -echo "Checking SHA1 on '$targetFile'" -echo "$expectedSha1 *$targetFile" | shasum --check +echo "Mounting $targetFile" +sudo mount "$url" /Volumes -echo Mounting DMG -hdiutil attach "$targetFile" +sudo cp "/Volumes/$targetFile" /tmp +sudo umount /Volumes +sudo hdiutil attach "/tmp/$targetFile" echo Installing JDK cd /Volumes/JDK\ 8\ Update\ 102/ && sudo installer -package JDK\ 8\ Update\ 102.pkg -target / -disk=`hdiutil info | grep '/Volumes/JDK 8 Update 102' | awk '{print $1}'` -hdiutil detach $disk - -echo "Removing temporary file '$targetFile'" -rm "$targetFile" +echo "Unmounting $targetFile" +sudo hdiutil unmount /Volumes/JDK\ 8\ Update\ 102/ -force echo "Disable auto update" sudo defaults write /Library/Preferences/com.oracle.java.Java-Updater JavaAutoUpdateEnabled -bool false |