Necessary to provide a single source of truth for installing Ruby dependencies. This used to be managed by the Ruby Setup project but that project is being deprecated in favor of this project.
67 lines
2.3 KiB
Bash
Executable File
67 lines
2.3 KiB
Bash
Executable File
#! /usr/bin/env bash
|
|
|
|
# Executes the command line interface.
|
|
|
|
source lib/installers.sh
|
|
source lib/options.sh
|
|
source lib/reinstallers.sh
|
|
source lib/settings.sh
|
|
source lib/uninstallers.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: Apply basic settings.\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 " rg: Install Ruby gems.\n"
|
|
printf " rc: Install Rust crates.\n"
|
|
printf " d: Apply default settings.\n"
|
|
printf " s: Setup installed software.\n"
|
|
printf " i: Install everything (i.e. executes all install options).\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 " ua: Uninstall application software.\n"
|
|
printf " ux: Uninstall application software extension.\n"
|
|
printf " ra: Reinstall application software.\n"
|
|
printf " rx: Reinstall application software extension.\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
|