From 9884a4e98e544a6b627b912a3bcaa477c0d29209 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 24 Apr 2017 12:18:53 +0200 Subject: [PATCH] Make Java installation independent from the disks in the system MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Assuming that the JDK dmg will always be mounted via /dev/disk1s1 breaks when another disk is present in the system and the DMG ends up at disk2 for example. Change-Id: Ia196a6ae18f455144802167c0887bf18dafbc101 Reviewed-by: Tony Sarajärvi --- coin/provisioning/qtci-macos-10.12-x86_64/020-java.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/coin/provisioning/qtci-macos-10.12-x86_64/020-java.sh b/coin/provisioning/qtci-macos-10.12-x86_64/020-java.sh index 6ae54526..a9776ba6 100755 --- a/coin/provisioning/qtci-macos-10.12-x86_64/020-java.sh +++ b/coin/provisioning/qtci-macos-10.12-x86_64/020-java.sh @@ -79,7 +79,8 @@ try echo Installing JDK (cd /Volumes/JDK\ 8\ Update\ 102/ && sudo installer -package JDK\ 8\ Update\ 102.pkg -target /) || throw $ExceptionInstall - hdiutil detach /dev/disk1s1 || throw $ExceptionDetachImage + disk=`hdiutil info | grep '/Volumes/JDK 8 Update 102' | awk '{print $1}'` + hdiutil detach $disk || throw $ExceptionDetachImage echo "Removing temporary file '$targetFile'" rm "$targetFile" || throw $ExceptionRemoveTmpFile