mirror of
https://github.com/ViViDboarder/shoestrap.git
synced 2024-12-29 17:27:44 +00:00
101ff729f8
Note: Version 2.7.1 doesn't actually support Monterey, so it will 404. When the new release comes out, I'll bump the version.
32 lines
762 B
Bash
Executable File
32 lines
762 B
Bash
Executable File
#! /bin/bash
|
|
|
|
MACPORTS_VERSION=2.7.1
|
|
MACOS_VERSION=$(sw_vers -productVersion)
|
|
case $MACOS_VERSION in
|
|
12.*)
|
|
MACOS_NAME=12-Monterey
|
|
;;
|
|
11.*)
|
|
MACOS_NAME=11-BigSur
|
|
;;
|
|
10.15.*)
|
|
MACOS_NAME=10.15-Catalina
|
|
;;
|
|
10.14.*)
|
|
MACOS_NAME=10.14-Mojave
|
|
;;
|
|
*)
|
|
error "Unknown MacOS Version"
|
|
esac
|
|
|
|
INSTALLER_NAME=MacPorts-${MACPORTS_VERSION}-${MACOS_NAME}.pkg
|
|
|
|
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"
|
|
xcode-select --install
|
|
|
|
log "Run macports installer"
|
|
sudo installer -pkg "${PROJECT_DIR}/tmp/${INSTALLER_NAME}" -target /
|