Added script hooks for unfinished custom configurations.

- These scripts default to calling out to scripts of the same name as
  defined by the custom configuration project (i.e.
  `$MAC_OS_CONFIG_PATH`).
- This helps ensure the scripts in this project can be run
  appropriately even if the custom configuration project hasn't fully
  implemented all scripts yet.
- This also helps illustrate what scripts are necessary when creating a
  custom configuration.
This commit is contained in:
Brooke Kuhlmann
2016-10-11 16:31:47 -06:00
parent 57e20929b3
commit d546d79759
9 changed files with 159 additions and 15 deletions

18
bin/apply_basic_settings Executable file
View File

@@ -0,0 +1,18 @@
#! /usr/bin/env bash
# DESCRIPTION
# Applies basic system settings.
# SETTINGS
set -o nounset
set -o errexit
set -o pipefail
IFS=$'\n\t'
SCRIPT_PATH="$MAC_OS_CONFIG_PATH/bin/apply_basic_settings"
# EXECUTION
if [[ -x "$SCRIPT_PATH" ]]; then
"$SCRIPT_PATH"
else
printf "WARNING: Basic settings script does not exist or is not executable.\n"
fi

18
bin/apply_default_settings Executable file
View File

@@ -0,0 +1,18 @@
#! /usr/bin/env bash
# DESCRIPTION
# Applies default settings.
# SETTINGS
set -o nounset
set -o errexit
set -o pipefail
IFS=$'\n\t'
SCRIPT_PATH="$MAC_OS_CONFIG_PATH/bin/apply_default_settings"
# EXECUTION
if [[ -x "$SCRIPT_PATH" ]]; then
"$SCRIPT_PATH"
else
printf "WARNING: Default settings script does not exist or is not executable.\n"
fi

18
bin/install_app_store Executable file
View File

@@ -0,0 +1,18 @@
#! /usr/bin/env bash
# DESCRIPTION
# Installs App Store software.
# SETTINGS
set -o nounset
set -o errexit
set -o pipefail
IFS=$'\n\t'
SCRIPT_PATH="$MAC_OS_CONFIG_PATH/bin/install_app_store"
# EXECUTION
if [[ -x "$SCRIPT_PATH" ]]; then
"$SCRIPT_PATH"
else
printf "WARNING: App Store install script does not exist or is not executable.\n"
fi

18
bin/install_applications Executable file
View File

@@ -0,0 +1,18 @@
#! /usr/bin/env bash
# DESCRIPTION
# Installs applications.
# SETTINGS
set -o nounset
set -o errexit
set -o pipefail
IFS=$'\n\t'
SCRIPT_PATH="$MAC_OS_CONFIG_PATH/bin/install_applications"
# EXECUTION
if [[ -x "$SCRIPT_PATH" ]]; then
"$SCRIPT_PATH"
else
printf "WARNING: Applications install script does not exist or is not executable.\n"
fi

18
bin/install_extensions Executable file
View File

@@ -0,0 +1,18 @@
#! /usr/bin/env bash
# DESCRIPTION
# Installs application extensions.
# SETTINGS
set -o nounset
set -o errexit
set -o pipefail
IFS=$'\n\t'
SCRIPT_PATH="$MAC_OS_CONFIG_PATH/bin/install_extensions"
# EXECUTION
if [[ -x "$SCRIPT_PATH" ]]; then
"$SCRIPT_PATH"
else
printf "WARNING: Application extensions install script does not exist or is not executable.\n"
fi

18
bin/install_homebrew Executable file
View File

@@ -0,0 +1,18 @@
#! /usr/bin/env bash
# DESCRIPTION
# Installs Homebrew software.
# SETTINGS
set -o nounset
set -o errexit
set -o pipefail
IFS=$'\n\t'
SCRIPT_PATH="$MAC_OS_CONFIG_PATH/bin/install_homebrew"
# EXECUTION
if [[ -x "$SCRIPT_PATH" ]]; then
"$SCRIPT_PATH"
else
printf "WARNING: Homebrew install script does not exist or is not executable.\n"
fi

18
bin/restore_backup Executable file
View File

@@ -0,0 +1,18 @@
#! /usr/bin/env bash
# DESCRIPTION
# Performs restoration of backup data.
# SETTINGS
set -o nounset
set -o errexit
set -o pipefail
IFS=$'\n\t'
SCRIPT_PATH="$MAC_OS_CONFIG_PATH/bin/restore_backup"
# EXECUTION
if [[ -x "$SCRIPT_PATH" ]]; then
"$SCRIPT_PATH"
else
printf "WARNING: Restore backup script does not exist or is not executable.\n"
fi

18
bin/setup_software Executable file
View File

@@ -0,0 +1,18 @@
#! /usr/bin/env bash
# DESCRIPTION
# Sets up and launches (if necessary) installed software.
# SETTINGS
set -o nounset
set -o errexit
set -o pipefail
IFS=$'\n\t'
SCRIPT_PATH="$MAC_OS_CONFIG_PATH/bin/setup_software"
# EXECUTION
if [[ -x "$SCRIPT_PATH" ]]; then
"$SCRIPT_PATH"
else
printf "WARNING: Software setup script does not exist or is not executable.\n"
fi

View File

@@ -11,34 +11,34 @@ process_option() {
'B') 'B')
bin/create_boot_disk;; bin/create_boot_disk;;
'b') 'b')
"$MAC_OS_CONFIG_PATH/bin/apply_basic_settings";; bin/apply_basic_settings;;
't') 't')
bin/install_dev_tools;; bin/install_dev_tools;;
'h') 'h')
"$MAC_OS_CONFIG_PATH/bin/install_homebrew";; bin/install_homebrew;;
'm') 'm')
"$MAC_OS_CONFIG_PATH/bin/install_app_store";; bin/install_app_store;;
'a') 'a')
"$MAC_OS_CONFIG_PATH/bin/install_applications";; bin/install_applications;;
'x') 'x')
"$MAC_OS_CONFIG_PATH/bin/install_extensions";; bin/install_extensions;;
'd') 'd')
"$MAC_OS_CONFIG_PATH/bin/apply_default_settings";; bin/apply_default_settings;;
's') 's')
"$MAC_OS_CONFIG_PATH/bin/setup_software";; bin/setup_software;;
'i') 'i')
caffeinate_machine caffeinate_machine
"$MAC_OS_CONFIG_PATH/bin/apply_basic_settings" bin/apply_basic_settings
bin/install_dev_tools bin/install_dev_tools
"$MAC_OS_CONFIG_PATH/bin/install_homebrew" bin/install_homebrew
"$MAC_OS_CONFIG_PATH/bin/install_app_store" bin/install_app_store
"$MAC_OS_CONFIG_PATH/bin/install_applications" bin/install_applications
"$MAC_OS_CONFIG_PATH/bin/install_extensions" bin/install_extensions
"$MAC_OS_CONFIG_PATH/bin/apply_default_settings" bin/apply_default_settings
"$MAC_OS_CONFIG_PATH/bin/setup_software" bin/setup_software
clean_work_path;; clean_work_path;;
'R') 'R')
"$MAC_OS_CONFIG_PATH/bin/restore_backup";; bin/restore_backup;;
'c') 'c')
verify_homebrews verify_homebrews
verify_applications verify_applications