Make Java installation independent from the disks in the system

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 <tony.sarajarvi@qt.io>
This commit is contained in:
Simon Hausmann
2017-04-24 12:18:53 +02:00
parent 69da4dda48
commit 9884a4e98e

View File

@@ -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