From c3c3036c88fd381e2169302d9a51a2872739eae4 Mon Sep 17 00:00:00 2001 From: Brooke Kuhlmann Date: Mon, 15 Mar 2021 20:26:28 -0600 Subject: [PATCH] Added dotfiles script Necessary to make installing personal dotfiles a first class citizen like many of the other install scripts. Having one's own dotfiles as part of the machine setup helps ensure the shell is configured properly especially when it comes to dealing with language specific dependencies for Ruby, Rust, Node, etc. This reduces duplication within this project -- and the macOS Configuration project -- from having to know all of these details when settings can be defined within one's own dotfiles once. --- bin/install_dotfiles | 16 ++++++++++++++++ bin/run | 3 ++- lib/options.sh | 3 +++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100755 bin/install_dotfiles diff --git a/bin/install_dotfiles b/bin/install_dotfiles new file mode 100755 index 0000000..54eb732 --- /dev/null +++ b/bin/install_dotfiles @@ -0,0 +1,16 @@ +#! /usr/bin/env bash + +# Installs dotfiles. + +set -o nounset +set -o errexit +set -o pipefail +IFS=$'\n\t' + +SCRIPT_PATH="$MAC_OS_CONFIG_PATH/bin/install_dotfiles" + +if [[ -x "$SCRIPT_PATH" ]]; then + "$SCRIPT_PATH" +else + printf "WARNING: Dotfiles install script does not exist or is not executable.\n" +fi diff --git a/bin/run b/bin/run index 0542d78..5bef68a 100755 --- a/bin/run +++ b/bin/run @@ -39,12 +39,13 @@ while true; do 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: Apply default settings.\n" printf " s: Setup installed software.\n" - printf " i: Install everything (i.e. executes all install options).\n" + printf " i: Install everything (i.e. executes all install options in order listed).\n" printf " Restore:\n" printf " R: Restore settings from backup.\n" printf " Manage:\n" diff --git a/lib/options.sh b/lib/options.sh index 52182ff..c390064 100644 --- a/lib/options.sh +++ b/lib/options.sh @@ -22,6 +22,8 @@ process_option() { bin/install_applications;; 'x') bin/install_extensions;; + 'df') + bin/install_dotfiles;; 'np') bin/install_node_packages;; 'rg') @@ -41,6 +43,7 @@ process_option() { bin/install_app_store bin/install_applications bin/install_extensions + bin/install_dotfiles bin/install_node_packages bin/install_ruby_gems bin/install_rust_crates