diff options
Diffstat (limited to 'coin/provisioning/qtci-osx-10.11-x86_64/020-xcode.sh')
-rwxr-xr-x | coin/provisioning/qtci-osx-10.11-x86_64/020-xcode.sh | 67 |
1 files changed, 3 insertions, 64 deletions
diff --git a/coin/provisioning/qtci-osx-10.11-x86_64/020-xcode.sh b/coin/provisioning/qtci-osx-10.11-x86_64/020-xcode.sh index 44453e55..7555c752 100755 --- a/coin/provisioning/qtci-osx-10.11-x86_64/020-xcode.sh +++ b/coin/provisioning/qtci-osx-10.11-x86_64/020-xcode.sh @@ -47,68 +47,7 @@ # shellcheck source=../common/try_catch.sh source "${BASH_SOURCE%/*}/../common/try_catch.sh" -ExceptionDownloadUrl=100 -ExceptionSHA1=101 -ExceptionUnXZ=102 -ExceptionCPIO=103 -ExceptionDelete=104 -ExceptionAcceptLicense=105 - - -url=http://ci-files01-hki.ci.local/input/mac/Xcode_8.2.xz -targetFile=/tmp/Xcode_8.2.xz -expectedSha1=46edc920955e315d946e36c45f629d5ee9dc9d59 - -try -( - echo "Downloading Xcode from primary URL '$url'" - curl --fail -L --retry 5 --retry-delay 5 -o "$targetFile" "$url" || throw $ExceptionDownloadUrl - - echo "Checking SHA1 on $targetFile" - echo "$expectedSha1 *$targetFile" | shasum --check || throw $ExceptionSHA1 - - echo "Uncompressing '$targetFile'" - xz -d "$targetFile" || throw $ExceptionUnXZ - - echo "Unarchiving '${targetFile%.*}'" - (cd /Applications/ && sudo cpio -dmiI "${targetFile%.*}") || throw $ExceptionCPIO - - echo "Deleting '${targetFile%.*}'" - rm "${targetFile%.*}" || throw $ExceptionDelete - - echo "Accept license" - sudo xcodebuild -license accept || throw $ExceptionAcceptLicense - - echo "Xcode = 8.2" >> ~/versions.txt -) -catch || { - case $ex_code in - $ExceptionDownloadUrl) - echo "Failed to download Xcode." - exit 1; - ;; - $ExceptionSHA1) - echo "Failed to check SHA1." - exit 1; - ;; - $ExceptionUnXZ) - echo "Failed to uncompress .xz" - exit 1; - ;; - $ExceptionCPIO) - echo "Failed to unarchive .cpio." - exit 1; - ;; - $ExceptionDelete) - echo "Failed to delete temporary file." - exit 1; - ;; - $ExceptionAcceptLicense) - echo "Failed to accept license." - exit 1; - ;; - - esac -} - +# shellcheck source=../common/install_xcode.sh +source "${BASH_SOURCE%/*}/../common/install_xcode.sh" +InstallXCode /net/ci-files01-hki.ci.local/hdd/www/input/mac/Xcode_8.2.xz 8.2 |