Skip to content
Snippets Groups Projects
Commit 798df84c authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

Forget about installing xcode

parent cd36861e
No related branches found
No related tags found
No related merge requests found
......@@ -32,7 +32,6 @@ ovadir="${curdir}/ova"
if [[ "$1" == "10.9" ]]; then
app="/Applications/Install OS X Mavericks.app"
dmg="${dmgdir}/OSX_InstallESD_10.9.5_13F34.dmg"
xcode_version="6.2"
else
echo "Version $1 is currently unsupported"
exit 1
......@@ -45,20 +44,12 @@ guest_os_type="MacOS${short_ver}_64"
ovf="${ovfdir}/${machine_name}.ovf"
ova="${ovadir}/${machine_name}.ova"
echo "Checking for Xcode ${xcode_version} DMG..."
if [ ! -r "xcode/Xcode_${xcode_version}.dmg" ]; then
echo "Cannot find xcode/Xcode_${xcode_version}.dmg for installation"
echo "Download it from: https://developer.apple.com/download/more/"
exit 1
fi
echo "Building virtualbox machine for macOS $1..."
echo "username = ${username}"
echo "password = ${password}"
echo "app = ${app}"
echo "os type = ${guest_os_type}"
echo "name = ${machine_name}"
echo "xcode = ${xcode_version}"
echo "xcode SDK = ${xcode_sdk_version}"
echo "dmg = ${dmg}"
echo "ovf = ${ovf}"
......@@ -105,7 +96,6 @@ if [ ! -r "${ova}" ]; then
-var output_directory="${ovadir}" \
-var machine_name="${machine_name}" \
-var xcode_sdk_version="${xcode_sdk_version}" \
-var xcode_version="${xcode_version}" \
-var username="${username}" \
-var password="${password}" \
-var provisioning_delay=30 \
......
#!/usr/bin/env bash
set -eox pipefail
mountpoint="/Volumes/xcode"
hdiutil attach -mountpoint "${mountpoint}" /tmp/xcode/Xcode_${XCODE_VERSION}.dmg
if [ -r ${mountpoint}/XcodeTools.mpkg ]; then
# newer versions of Xcode
installer -pkg ${mountpoint}/XcodeTools.mpkg -target /
elif [ -d ${mountpoint}/Xcode.app ]; then
# older versions
cp -a ${mountpoint}/Xcode.app /Applications
else
echo "Don't know how to install this version of Xcode (${XCODE_VERSION})"
exit 1
fi
hdiutil detach "${mountpoint}"
rm -rf /tmp/xcode
echo "Agreeing the Xcode license..."
xcodebuild -license accept
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment