shoestrap/recipes/mac-setup/macports

23 lines
596 B
Plaintext
Raw Normal View History

2021-10-22 23:22:57 +00:00
#! /bin/bash
MACPORTS_VERSION=2.7.1
MACOS_VERSION=$(sw_vers -productVersion)
case $MACOS_VERSION in
11.*)
MACOS_NAME=11-BigSur
;;
*)
error "Unknown MacOS Version"
esac
INSTALLER_NAME=MacPorts-${MACPORTS_VERSION}-${MACOS_NAME}.pkg
2021-10-23 01:02:21 +00:00
log "Download $INSTALLER_NAME"
curl -o "${PROJECT_DIR}/tmp/${INSTALLER_NAME}" -L "https://github.com/macports/macports-base/releases/download/v${MACPORTS_VERSION}/${INSTALLER_NAME}"
log "Install xcode tools"
2021-10-22 23:22:57 +00:00
xcode-select --install
2021-10-23 01:02:21 +00:00
log "Run macports installer"
sudo installer -pkg "${PROJECT_DIR}/tmp/${INSTALLER_NAME}" -target /