aboutsummaryrefslogtreecommitdiffstats
path: root/coin
diff options
context:
space:
mode:
authorTony Sarajärvi <tony.sarajarvi@qt.io>2018-03-08 13:39:19 +0200
committerTony Sarajärvi <tony.sarajarvi@qt.io>2018-03-19 11:56:55 +0000
commit250dd8c84eef62fbdb51856b367225adfabd643e (patch)
tree69442e7cb491489c96cc28bf7e1daa3008be54b6 /coin
parent1c6abfae014b3ece4d14d3dc7b9a22353cf18c66 (diff)
Remove try_catch codes from macOS 10.11 scripts
Change-Id: I7690ae186729b3a180b1d38c298a861d981dbf5d Reviewed-by: Joni Jäntti <joni.jantti@qt.io> Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
Diffstat (limited to 'coin')
-rwxr-xr-xcoin/provisioning/qtci-osx-10.11-x86_64/05-systemsetup.sh86
-rwxr-xr-xcoin/provisioning/qtci-osx-10.11-x86_64/15-xz.sh2
-rwxr-xr-xcoin/provisioning/qtci-osx-10.11-x86_64/20-xcode.sh3
3 files changed, 19 insertions, 72 deletions
diff --git a/coin/provisioning/qtci-osx-10.11-x86_64/05-systemsetup.sh b/coin/provisioning/qtci-osx-10.11-x86_64/05-systemsetup.sh
index 994dedf4..4a631b4f 100755
--- a/coin/provisioning/qtci-osx-10.11-x86_64/05-systemsetup.sh
+++ b/coin/provisioning/qtci-osx-10.11-x86_64/05-systemsetup.sh
@@ -37,33 +37,19 @@
set -ex
-# shellcheck source=../common/unix/try_catch.sh
-source "${BASH_SOURCE%/*}/../common/unix/try_catch.sh"
-
VNCPassword=qt
NTS_IP=10.212.2.216
-ExceptionDisableScreensaver=100
-ExceptionSetInitialDelay=101
-ExceptionSetDelay=102
-ExceptionVNC=103
-ExceptionNTS=104
-ExceptionDisableScreensaverPassword=105
-ExceptionDisableSleep=106
-
-try
-(
- echo "Disable Screensaver"
- # For current session
- defaults -currentHost write com.apple.screensaver idleTime 0 || throw $ExceptionDisableScreensaver
+echo "Disable Screensaver"
+# For current session
+defaults -currentHost write com.apple.screensaver idleTime 0
- echo "Disable sleep"
- sudo pmset sleep 0 displaysleep 0 || throw $ExceptionDisableSleep
+echo "Disable sleep"
+sudo pmset sleep 0 displaysleep 0
- # For session after a reboot
- mkdir -p "$HOME/Library/LaunchAgents" || throw $ExceptionDisableScreensaver
- (
- cat >"$HOME/Library/LaunchAgents/no-screensaver.plist" <<EOT
+# For session after a reboot
+mkdir -p "$HOME/Library/LaunchAgents"
+cat >"$HOME/Library/LaunchAgents/no-screensaver.plist" <<EOT
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
@@ -87,54 +73,18 @@ try
</dict>
</plist>
EOT
- ) || throw $ExceptionDisableScreensaver
-
- defaults write com.apple.screensaver askForPassword -int 0 || throw $ExceptionDisableScreensaverPassword
-
- echo "Set keyboard type rates and delays"
- # normal minimum is 15 (225 ms)
- defaults write -g InitialKeyRepeat -int 15 || throw $ExceptionSetInitialDelay
- # normal minimum is 2 (30 ms)
- defaults write -g KeyRepeat -int 2 || throw $ExceptionSetDelay
- echo "Enable remote desktop sharing"
- sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -clientopts -setvnclegacy -vnclegacy yes -clientopts -setvncpw -vncpw $VNCPassword -restart -agent -privs -all || throw $ExceptionVNC
+defaults write com.apple.screensaver askForPassword -int 0
- echo "Set Network Test Server address to $NTS_IP in /etc/hosts"
- echo "$NTS_IP qt-test-server qt-test-server.qt-test-net" | sudo tee -a /etc/hosts || throw $ExceptionNTS
+echo "Set keyboard type rates and delays"
+# normal minimum is 15 (225 ms)
+defaults write -g InitialKeyRepeat -int 15
+# normal minimum is 2 (30 ms)
+defaults write -g KeyRepeat -int 2
-)
-catch || {
- case $ex_code in
- $ExceptionDisableScreensaver)
- echo "Failed to disable screensaver."
- exit 1;
- ;;
- $ExceptionSetInitialDelay)
- echo "Failed to set initial delay of keyboard."
- exit 1;
- ;;
- $ExceptionSetDelay)
- echo "Failed to set delay of keyboard."
- exit 1;
- ;;
- $ExceptionVNC)
- echo "Failed to enable VNC."
- exit 1;
- ;;
- $ExceptionNTS)
- echo "Failed to set NTS."
- exit 1;
- ;;
- $ExceptionDisableScreensaverPassword)
- echo "Failed to disable requiring of password after screensaver is enabled."
- exit 1;
- ;;
- $ExceptionDisableSleep)
- echo "Failed to disable sleep."
- exit 1;
- ;;
+echo "Enable remote desktop sharing"
+sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -clientopts -setvnclegacy -vnclegacy yes -clientopts -setvncpw -vncpw $VNCPassword -restart -agent -privs -all
- esac
-}
+echo "Set Network Test Server address to $NTS_IP in /etc/hosts"
+echo "$NTS_IP qt-test-server qt-test-server.qt-test-net" | sudo tee -a /etc/hosts
diff --git a/coin/provisioning/qtci-osx-10.11-x86_64/15-xz.sh b/coin/provisioning/qtci-osx-10.11-x86_64/15-xz.sh
index 9f66cc66..13b05040 100755
--- a/coin/provisioning/qtci-osx-10.11-x86_64/15-xz.sh
+++ b/coin/provisioning/qtci-osx-10.11-x86_64/15-xz.sh
@@ -39,7 +39,7 @@
set -ex
-# shellcheck source=../common/unix/try_catch.sh
+# shellcheck source=../common/macos/InstallPKGFromURL.sh
source "${BASH_SOURCE%/*}/../common/macos/InstallPKGFromURL.sh"
PrimaryUrl="http://ci-files01-hki.intra.qt.io/input/mac/osx_10.11_el_capitan/XZ.pkg"
diff --git a/coin/provisioning/qtci-osx-10.11-x86_64/20-xcode.sh b/coin/provisioning/qtci-osx-10.11-x86_64/20-xcode.sh
index b1e1d657..a067f637 100755
--- a/coin/provisioning/qtci-osx-10.11-x86_64/20-xcode.sh
+++ b/coin/provisioning/qtci-osx-10.11-x86_64/20-xcode.sh
@@ -44,9 +44,6 @@
set -ex
-# shellcheck source=../common/unix/try_catch.sh
-source "${BASH_SOURCE%/*}/../common/unix/try_catch.sh"
-
# shellcheck source=../common/macos/install_xcode.sh
source "${BASH_SOURCE%/*}/../common/macos/install_xcode.sh"