Files
mac_os/lib/options.sh
Brooke Kuhlmann 57e20929b3 Added script hook for App Store software install.
- Allows for the automation of Mac App Store software via the
  [Mac App Store CLI](https://github.com/mas-cli/mas) app.
- See [macOS Config](https://github.com/bkuhlmann/mac_os-config) for
  usage.
2016-10-11 11:54:20 -06:00

64 lines
1.6 KiB
Bash

#! /usr/bin/env bash
# DESCRIPTION
# Defines command line prompt options.
# Process option selection.
# Parameters:
# $1 = The option to process.
process_option() {
case $1 in
'B')
bin/create_boot_disk;;
'b')
"$MAC_OS_CONFIG_PATH/bin/apply_basic_settings";;
't')
bin/install_dev_tools;;
'h')
"$MAC_OS_CONFIG_PATH/bin/install_homebrew";;
'm')
"$MAC_OS_CONFIG_PATH/bin/install_app_store";;
'a')
"$MAC_OS_CONFIG_PATH/bin/install_applications";;
'x')
"$MAC_OS_CONFIG_PATH/bin/install_extensions";;
'd')
"$MAC_OS_CONFIG_PATH/bin/apply_default_settings";;
's')
"$MAC_OS_CONFIG_PATH/bin/setup_software";;
'i')
caffeinate_machine
"$MAC_OS_CONFIG_PATH/bin/apply_basic_settings"
bin/install_dev_tools
"$MAC_OS_CONFIG_PATH/bin/install_homebrew"
"$MAC_OS_CONFIG_PATH/bin/install_app_store"
"$MAC_OS_CONFIG_PATH/bin/install_applications"
"$MAC_OS_CONFIG_PATH/bin/install_extensions"
"$MAC_OS_CONFIG_PATH/bin/apply_default_settings"
"$MAC_OS_CONFIG_PATH/bin/setup_software"
clean_work_path;;
'R')
"$MAC_OS_CONFIG_PATH/bin/restore_backup";;
'c')
verify_homebrews
verify_applications
verify_extensions;;
'C')
caffeinate_machine;;
'ua')
uninstall_application;;
'ux')
uninstall_extension;;
'ra')
reinstall_application;;
'rx')
reinstall_extension;;
'w')
clean_work_path;;
'q');;
*)
printf "ERROR: Invalid option.\n";;
esac
}
export -f process_option