Add macports install

This commit is contained in:
ViViDboarder 2021-10-22 16:22:57 -07:00
parent c8d635e9eb
commit db46f9381c
2 changed files with 36 additions and 0 deletions

19
mac-setup Executable file
View File

@ -0,0 +1,19 @@
#!/bin/bash
# Initialization - DO NOT REMOVE
. helpers/initialize
##############################################################
### Customizations start here ################################
##############################################################
# Get current directory for future use in links
cd "$(dirname "$0")" || { echo "Could not change directory to $0"; exit 1;}
PROJECT_DIR=$(pwd)
export PROJECT_DIR
detect_package_manager
init_paths_and_vars
recipe 'macports'

17
recipes/mac-setup/macports Executable file
View File

@ -0,0 +1,17 @@
#! /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
curl -o "${PROJECT_DIR}/${INSTALLER_NAME}" -L "https://github.com/macports/macports-base/releases/download/v${MACPORTS_VERSION}/${INSTALLER_NAME}"
xcode-select --install
sudo installer -pkg "${PROJECT_DIR}/${INSTALLER_NAME}" -target /