diff --git a/mac-setup b/mac-setup new file mode 100755 index 0000000..4babf71 --- /dev/null +++ b/mac-setup @@ -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' diff --git a/recipes/mac-setup/macports b/recipes/mac-setup/macports new file mode 100755 index 0000000..198694e --- /dev/null +++ b/recipes/mac-setup/macports @@ -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 /