Files
mac_os/bin/run
Brooke Kuhlmann 4159fbce71 Updated run script to distinquish between applications and libraries
Necessary to improve the install reliability of software and
associated libraries (extensions). There is now a split between core
installation of applications and associated libraries. This is a loose
split since everything in the *Install* category is mostly
applications but also contains related setup while the *Libraries*
category requires a machine reboot so the fully configured environment
is loaded to ensure all libraries install properly.

The specifics of these changes will be handled in the corresponding
macOS Configuration project.
2022-12-25 08:42:43 -07:00

63 lines
2.2 KiB
Bash
Executable File

#! /usr/bin/env bash
# Executes the command line interface.
source lib/installers.sh
source lib/options.sh
source lib/settings.sh
source lib/utilities.sh
source lib/verifiers.sh
if [[ -e "$MAC_OS_CONFIG_PATH" ]]; then
source "$MAC_OS_CONFIG_PATH/lib/settings.sh"
else
printf "ERROR: Unable to load macOS configuration: $MAC_OS_CONFIG_PATH.\n\n"
printf "Please check the following before continuing:\n"
printf " • Download the default macOS configuration here: https://github.com/bkuhlmann/mac_os-config.\n"
printf " • Customize as necessary for your setup or fork the project and make your own configuration.\n"
printf " • When finished, your folder structure should look like this:\n"
printf " • <root path>/mac_os:\n"
printf " • <root path>/mac_os-config:\n"
exit 1
fi
configure_environment
while true; do
if [[ $# == 0 ]]; then
printf "\nUsage: run OPTION\n"
printf "\nOSX Options:\n"
printf " Boot:\n"
printf " B: Create boot disk.\n"
printf " Install:\n"
printf " b: Install basics.\n"
printf " t: Install development tools.\n"
printf " hf: Install Homebrew Formulas.\n"
printf " hc: Install Homebrew Casks.\n"
printf " m: Install Mac App Store software.\n"
printf " a: Install application software.\n"
printf " x: Install application software extensions.\n"
printf " d: Install defaults.\n"
printf " s: Install shell.\n"
printf " r: Restore backups.\n"
printf " i: Install all (i.e. executes all of the above steps in order listed).\n"
printf " Libraries:\n"
printf " np: Install Node packages.\n"
printf " rg: Install Ruby gems.\n"
printf " rc: Install Rust crates.\n"
printf " l: Install libraries (i.e. executes all of the above steps in order listed).\n"
printf " Manage:\n"
printf " c: Check status of managed software.\n"
printf " C: Caffeinate machine.\n"
printf " w: Clean work (temp) directory.\n"
printf " q: Quit/Exit.\n\n"
read -p "Enter selection: " response
printf "\n"
process_option $response
else
process_option $1
fi
break
done