Files
mac_os/bin/run
Brooke Kuhlmann 1ef42c9040 Updated installs for basic, default, and shell scripts
Improves name consistency by using the same `install_` prefix for all
install scripts.

The dotfiles script was renamed as a shell script since this is now a
dedicated shell configuration script so people can configure their
default shell as they like. Use of this new shell script will be
configured in a future commit.
2022-12-25 08:42:43 -07:00

62 lines
2.1 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 " df: Install dotfiles.\n"
printf " np: Install Node packages.\n"
printf " rg: Install Ruby gems.\n"
printf " rc: Install Rust crates.\n"
printf " d: Install defaults.\n"
printf " i: Install all (i.e. executes all of the above steps in order listed).\n"
printf " Restore:\n"
printf " R: Restore settings from backup.\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