summaryrefslogtreecommitdiffstats
path: root/src/ci/scripts/select-xcode.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/ci/scripts/select-xcode.sh')
-rwxr-xr-xsrc/ci/scripts/select-xcode.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/ci/scripts/select-xcode.sh b/src/ci/scripts/select-xcode.sh
new file mode 100755
index 000000000..3b9c77d42
--- /dev/null
+++ b/src/ci/scripts/select-xcode.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+# This script selects the Xcode instance to use.
+
+set -euo pipefail
+IFS=$'\n\t'
+
+source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
+
+if isMacOS; then
+ if [[ -s "${SELECT_XCODE-}" ]]; then
+ sudo xcode-select -s "${SELECT_XCODE}"
+ fi
+fi