mirror of
git://code.qt.io/qt/qt5.git
synced 2026-02-01 19:36:04 +08:00
Provisioning: Add force option when unmounting squish
Sometimes unmount of squish fail because resource busy even if the installation is already succeeded. To avoid this let's add force option to make sure unmounting works every time. Task-number: QTQAINFRA-1964 Change-Id: Icacd01341d09577d9880e3ed208cb6ea18a7ac4f Reviewed-by: Joni Jäntti <joni.jantti@qt.io> Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
This commit is contained in:
committed by
Simon Hausmann
parent
4a7366f960
commit
74fd490884
@@ -90,6 +90,11 @@ function MountAndInstall {
|
||||
squishLicenseDir="/root"
|
||||
fi
|
||||
|
||||
function UnMount {
|
||||
echo "Unmounting $mountFolder"
|
||||
sudo diskutil unmount force "$mountFolder" || sudo umount -f "$mountFolder"
|
||||
}
|
||||
|
||||
targetFileMount="$mountFolder"/"$targetFile"
|
||||
|
||||
echo "Mounting $url to $mountFolder"
|
||||
@@ -111,20 +116,20 @@ function MountAndInstall {
|
||||
target="$targetDirectory"
|
||||
fi
|
||||
sudo tar -xzf "$targetFileMount" --directory "$target"
|
||||
echo "Unmounting $mountFolder"
|
||||
sudo umount "$mountFolder"
|
||||
UnMount
|
||||
elif [[ $targetFile == *.dmg ]]; then
|
||||
echo "'dmg-file', no need to uncompress"
|
||||
sudo cp "$targetFileMount" /tmp
|
||||
sudo umount "$mountFolder"
|
||||
sudo cp $targetFileMount /tmp
|
||||
UnMount
|
||||
sudo hdiutil attach "/tmp/$targetFile"
|
||||
sudo /Volumes/froglogic\ Squish/Install\ Squish.app/Contents/MacOS/Squish unattended=1 targetdir="$targetDirectory/package" qtpath="$targetDirectory"
|
||||
sudo hdiutil unmount /Volumes/froglogic\ Squish/
|
||||
mountFolder="/Volumes/froglogic Squish"
|
||||
UnMount
|
||||
elif [[ $targetFile == *.run ]]; then
|
||||
echo "'run-file', no need to uncompress"
|
||||
sudo cp "$targetFileMount" "$targetDirectory"
|
||||
sudo umount "$mountFolder"
|
||||
sudo "$targetDirectory/$targetFile" unattended=1 targetdir="$targetDirectory/package" qtpath="$targetDirectory" > /dev/null 2>&1
|
||||
sudo cp $targetFileMount $targetDirectory
|
||||
UnMount
|
||||
sudo $targetDirectory/$targetFile unattended=1 targetdir="$targetDirectory/package" qtpath="$targetDirectory" > /dev/null 2>&1
|
||||
sudo rm -fr "$targetDirectory/$targetFile"
|
||||
if uname -a |grep -q "Ubuntu"; then
|
||||
sudo mkdir /usr/lib/tcl8.6
|
||||
|
||||
Reference in New Issue
Block a user