2024-01-26 02:50:32 +08:00
|
|
|
#!/bin/sh
|
2024-06-05 04:35:41 +08:00
|
|
|
|
|
|
|
# The next 2 lines are a workaround for an XCode Command Line Tools bug:
|
|
|
|
# https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#Known-Issues
|
|
|
|
sudo mkdir -p /Library/Developer/CommandLineTools
|
|
|
|
sudo touch /Library/Developer/CommandLineTools/.beta
|
2024-01-26 02:50:32 +08:00
|
|
|
hdiutil attach clt.dmg -mountpoint /Volumes/setup-installer
|
|
|
|
sudo installer -pkg "/Volumes/setup-installer/Command Line Tools.pkg" -target /
|
|
|
|
hdiutil detach /Volumes/setup-installer
|
|
|
|
rm clt.dmg
|
|
|
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
|
|
|
if [ `uname -m` = 'arm64' ]; then
|
|
|
|
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/vcpkg/.zprofile
|
|
|
|
eval "$(/opt/homebrew/bin/brew shellenv)"
|
|
|
|
else
|
|
|
|
(echo; echo 'eval "$(/usr/local/bin/brew shellenv)"') >> /Users/vcpkg/.zprofile
|
|
|
|
eval "$(/usr/local/bin/brew shellenv)"
|
|
|
|
fi
|
2024-06-05 04:35:41 +08:00
|
|
|
brew install autoconf-archive autoconf automake bison cmake gettext gfortran gperf gtk-doc libtool meson mono nasm ninja pkg-config powershell python-setuptools texinfo yasm
|
2024-01-26 02:50:32 +08:00
|
|
|
mkdir ~/Data
|
|
|
|
if [ `uname -m` = 'arm64' ]; then
|
2024-06-05 04:35:41 +08:00
|
|
|
curl -s -o ~/Downloads/azure-agent.tar.gz https://vstsagentpackage.azureedge.net/agent/3.239.1/vsts-agent-osx-arm64-3.239.1.tar.gz
|
2024-01-26 02:50:32 +08:00
|
|
|
else
|
2024-06-05 04:35:41 +08:00
|
|
|
curl -s -o ~/Downloads/azure-agent.tar.gz https://vstsagentpackage.azureedge.net/agent/3.239.1/vsts-agent-osx-x64-3.239.1.tar.gz
|
2024-01-26 02:50:32 +08:00
|
|
|
fi
|
|
|
|
mkdir ~/myagent
|
|
|
|
tar xf ~/Downloads/azure-agent.tar.gz -C ~/myagent
|
|
|
|
rm ~/Downloads/azure-agent.tar.gz
|
|
|
|
rm setup-box.sh
|