From 269003bd7d62c36bfd1c719d79f78a49ca0db397 Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Wed, 23 Jan 2019 17:27:47 -0600 Subject: [PATCH 01/43] bootstrap: Utilize `macos-tweak.sh` script --- bootstrap.sh | 14 +------------- macos-tweaks.sh | 3 +++ 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index 04e0122..7eff0de 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -21,19 +21,7 @@ fi echo '==> Install macOS tweaks? (Y/n)' read USER_PROMPT if [ "$USER_PROMPT" == 'y' ] || [ "$USER_PROMPT" == '' ]; then - echo '==> Installing macOS tweaks...' - - # Enable dark theme - defaults write NSGlobalDomain AppleInterfaceStyle Dark - - # Always show scrollbars - defaults write NSGlobalDomain AppleShowScrollBars -string "Always" - - # Disable natural scrolling - defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false - - # Automatically hide and show the Dock - defaults write com.apple.dock autohide -bool true + ./macos-tweaks.sh else echo '==> Skipping macOS tweaks' fi diff --git a/macos-tweaks.sh b/macos-tweaks.sh index d8e1604..7e5ef98 100755 --- a/macos-tweaks.sh +++ b/macos-tweaks.sh @@ -16,6 +16,9 @@ defaults write NSGlobalDomain AppleShowScrollBars -string "Always" # Disable auto-correct defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false +# Enable dark theme +defaults write NSGlobalDomain AppleInterfaceStyle Dark + ############################################################################### # Input # ############################################################################### From 217139705fdae0e794147a47f0bb296f7675cc21 Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Thu, 31 Jan 2019 13:00:18 -0600 Subject: [PATCH 02/43] macos-tweaks: Disable other text input features --- macos-tweaks.sh | 12 ++++++++++++ nodejs.sh | 8 ++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/macos-tweaks.sh b/macos-tweaks.sh index 7e5ef98..c1445f1 100755 --- a/macos-tweaks.sh +++ b/macos-tweaks.sh @@ -13,6 +13,18 @@ echo '==> Tweaking macOS settings...' # Always show scrollbars defaults write NSGlobalDomain AppleShowScrollBars -string "Always" +# Disable automatic capitalization as it’s annoying when typing code +defaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool false + +# Disable smart dashes as they’re annoying when typing code +defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false + +# Disable automatic period substitution as it’s annoying when typing code +defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool false + +# Disable smart quotes as they’re annoying when typing code +defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false + # Disable auto-correct defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false diff --git a/nodejs.sh b/nodejs.sh index e21ebb4..c97a234 100755 --- a/nodejs.sh +++ b/nodejs.sh @@ -20,10 +20,14 @@ if command -v 'brew' >/dev/null 2>&1 ; then brew install nvm # Allow NVM without restarting - source $(brew --prefix nvm)/nvm.sh + export NVM_DIR="$HOME/.nvm" + [ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm + [ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion" # This loads nvm bash_completion # Allow NVM after restarting - echo 'source $(brew --prefix nvm)/nvm.sh' >> ~/.profile + echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.bash_profile + echo '[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh"' >> ~/.bash_profile + echo '[ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion"' >> ~/.bash_profile echo "==> NVM installed." From 08d21e34f2367026d1562b38ed8e58b6dbdbe4b6 Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Mon, 4 Feb 2019 08:23:14 -0600 Subject: [PATCH 03/43] macos-tweaks: Disable spell check in Messages application --- macos-tweaks.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/macos-tweaks.sh b/macos-tweaks.sh index c1445f1..b27675d 100755 --- a/macos-tweaks.sh +++ b/macos-tweaks.sh @@ -70,11 +70,25 @@ defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true # Automatically hide and show the Dock defaults write com.apple.dock autohide -bool true +############################################################################### +# Messages # +############################################################################### + +# Disable automatic emoji substitution (i.e. use plain text smileys) +defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "automaticEmojiSubstitutionEnablediMessage" -bool false + +# Disable smart quotes as it’s annoying for messages that contain code +defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "automaticQuoteSubstitutionEnabled" -bool false + +# Disable continuous spell checking +defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "continuousSpellCheckingEnabled" -bool false + ############################################################################### # Kill affected applications # ############################################################################### for app in "Dock" \ - "Finder"; do + "Finder" \ + "Messages"; do killall "${app}" &> /dev/null done From 92b3f73ca3c28690ad1292a0e52a72dcfdf81b2d Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Tue, 9 Apr 2019 06:28:13 -0500 Subject: [PATCH 04/43] user-applications: install Alfred --- user-applications.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user-applications.sh b/user-applications.sh index c36ff50..9be7a19 100755 --- a/user-applications.sh +++ b/user-applications.sh @@ -15,7 +15,7 @@ fi if command -v 'brew' >/dev/null 2>&1 ; then echo '==> Installing user applications...' - brew cask install android-file-transfer clover-configurator eqmac firefox google-chrome keka slack spotify telegram-desktop transmission vlc + brew cask install alfred android-file-transfer clover-configurator eqmac firefox google-chrome keka slack spotify telegram-desktop transmission vlc else echo '==> Homebrew not found. Aborting...' exit 1 From 14391ba2be6cd178253dc3d7c938b82440d48bc7 Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Tue, 9 Apr 2019 06:28:52 -0500 Subject: [PATCH 05/43] user-applications: install Caffeine --- user-applications.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user-applications.sh b/user-applications.sh index 9be7a19..dcb863f 100755 --- a/user-applications.sh +++ b/user-applications.sh @@ -15,7 +15,7 @@ fi if command -v 'brew' >/dev/null 2>&1 ; then echo '==> Installing user applications...' - brew cask install alfred android-file-transfer clover-configurator eqmac firefox google-chrome keka slack spotify telegram-desktop transmission vlc + brew cask install alfred android-file-transfer caffeine clover-configurator eqmac firefox google-chrome keka slack spotify telegram-desktop transmission vlc else echo '==> Homebrew not found. Aborting...' exit 1 From e53e15f6c6b9143ea79d508a81597527e48c0b30 Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Tue, 9 Apr 2019 06:31:06 -0500 Subject: [PATCH 06/43] user-applications: install Plex Media Server --- user-applications.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user-applications.sh b/user-applications.sh index dcb863f..45d365d 100755 --- a/user-applications.sh +++ b/user-applications.sh @@ -15,7 +15,7 @@ fi if command -v 'brew' >/dev/null 2>&1 ; then echo '==> Installing user applications...' - brew cask install alfred android-file-transfer caffeine clover-configurator eqmac firefox google-chrome keka slack spotify telegram-desktop transmission vlc + brew cask install alfred android-file-transfer caffeine clover-configurator eqmac firefox google-chrome keka plex-media-server slack spotify telegram-desktop transmission vlc else echo '==> Homebrew not found. Aborting...' exit 1 From 195d84b06862cf26e102bf12ac2f019ba9155806 Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Tue, 9 Apr 2019 06:32:02 -0500 Subject: [PATCH 07/43] Rename `user-applications.sh` to `gui-applications.sh` --- bootstrap.sh | 2 +- user-applications.sh => gui-applications.sh | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename user-applications.sh => gui-applications.sh (100%) diff --git a/bootstrap.sh b/bootstrap.sh index 7eff0de..ccf3a8c 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -29,7 +29,7 @@ fi echo '==> Install user applications? (Y/n)' read USER_PROMPT if [ "$USER_PROMPT" == 'y' ] || [ "$USER_PROMPT" == '' ]; then - ./user-applications.sh + ./gui-applications.sh else echo '==> Skipping user applications' fi diff --git a/user-applications.sh b/gui-applications.sh similarity index 100% rename from user-applications.sh rename to gui-applications.sh From 5d0d14f00984032a023dfd38d5346d5620651d0d Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Thu, 16 May 2019 07:20:22 -0500 Subject: [PATCH 08/43] gui-applications: make `brew install` command multiline This makes it a bit easier to comment out applications that the user does not want. --- gui-applications.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/gui-applications.sh b/gui-applications.sh index 45d365d..180b2e5 100755 --- a/gui-applications.sh +++ b/gui-applications.sh @@ -15,7 +15,20 @@ fi if command -v 'brew' >/dev/null 2>&1 ; then echo '==> Installing user applications...' - brew cask install alfred android-file-transfer caffeine clover-configurator eqmac firefox google-chrome keka plex-media-server slack spotify telegram-desktop transmission vlc + brew cask install \ + alfred \ + android-file-transfer \ + caffeine \ + clover-configurator \ + eqmac firefox \ + google-chrome \ + keka \ + plex-media-server \ + slack \ + spotify \ + telegram-desktop \ + transmission vlc \ + else echo '==> Homebrew not found. Aborting...' exit 1 From a1b457302560e210e2f102ecb8468ad7089f5a97 Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Thu, 16 May 2019 07:21:36 -0500 Subject: [PATCH 09/43] macos-tweaks: don't enable dark mode by default --- macos-tweaks.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macos-tweaks.sh b/macos-tweaks.sh index b27675d..6e4db6e 100755 --- a/macos-tweaks.sh +++ b/macos-tweaks.sh @@ -29,7 +29,7 @@ defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false # Enable dark theme -defaults write NSGlobalDomain AppleInterfaceStyle Dark +# defaults write NSGlobalDomain AppleInterfaceStyle Dark ############################################################################### # Input # From 8ab38686bc41aa9b39819ee1907a4afd97b4e359 Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Thu, 16 May 2019 07:22:10 -0500 Subject: [PATCH 10/43] macos-tweaks: set computer sleep after 60 minutes --- macos-tweaks.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/macos-tweaks.sh b/macos-tweaks.sh index 6e4db6e..7ec3c96 100755 --- a/macos-tweaks.sh +++ b/macos-tweaks.sh @@ -31,6 +31,9 @@ defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false # Enable dark theme # defaults write NSGlobalDomain AppleInterfaceStyle Dark +# Enter sleep mode after 60 minutes +sudo systemsetup -setcomputersleep 60 + ############################################################################### # Input # ############################################################################### From 84a774e2d14e04dcc19f8af2cdb2f4b89c084d65 Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Thu, 16 May 2019 07:23:07 -0500 Subject: [PATCH 11/43] macos-tweaks: add commented command to disable notification center --- macos-tweaks.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/macos-tweaks.sh b/macos-tweaks.sh index 7ec3c96..eff7f04 100755 --- a/macos-tweaks.sh +++ b/macos-tweaks.sh @@ -34,6 +34,9 @@ defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false # Enter sleep mode after 60 minutes sudo systemsetup -setcomputersleep 60 +# Disable Notification Center and remove the menu bar icon +#launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist 2> /dev/null + ############################################################################### # Input # ############################################################################### From 027391fa6a491d15357e9bd45321ab2e1ead2407 Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Thu, 16 May 2019 07:23:30 -0500 Subject: [PATCH 12/43] macos-tweaks: don't disable .DS_Store files on external drives --- macos-tweaks.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/macos-tweaks.sh b/macos-tweaks.sh index eff7f04..70cc99a 100755 --- a/macos-tweaks.sh +++ b/macos-tweaks.sh @@ -67,8 +67,8 @@ defaults write com.apple.finder FXDefaultSearchScope -string "SCcf" defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false # Avoid creating .DS_Store files on network or USB volumes -defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true -defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true +#defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true +#defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true ############################################################################### # Dock # From 332c710a88afed43b0bae6c32682d2a82d36c6a6 Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Thu, 16 May 2019 07:23:48 -0500 Subject: [PATCH 13/43] macos-tweaks: whitespace changes --- macos-tweaks.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/macos-tweaks.sh b/macos-tweaks.sh index 70cc99a..7a4341e 100755 --- a/macos-tweaks.sh +++ b/macos-tweaks.sh @@ -79,7 +79,6 @@ defaults write com.apple.dock autohide -bool true ############################################################################### # Messages # ############################################################################### - # Disable automatic emoji substitution (i.e. use plain text smileys) defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "automaticEmojiSubstitutionEnablediMessage" -bool false From eea812a10d490274a8de47147c76485283790ad5 Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Mon, 27 May 2019 20:37:20 -0500 Subject: [PATCH 14/43] development-utils: install Xcode command line tools --- development-utils.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/development-utils.sh b/development-utils.sh index 6c8cccc..6f1da93 100755 --- a/development-utils.sh +++ b/development-utils.sh @@ -8,6 +8,16 @@ set -e # Update the user's cached credentials, authenticating the user if necessary sudo -v +echo '==> Install Xcode command line tools? (Y/n)' +read USER_PROMPT +if [ "$USER_PROMPT" = 'y' ] || [ "$USER_PROMPT" = '' ]; then + echo '==> Installing Xcode command line tools...' + xcode-select --install + sudo xcode-select -s /Applications/Xcode.app/Contents/Developer +else + echo '==> Skipping Xcode command line tools' +fi + if ! command -v 'brew' >/dev/null 2>&1 ; then echo '==> Install Homebrew? (Y/n)' read USER_PROMPT From ec19a0f03f3e715592de7d8ed1bc3984416f905f Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Mon, 27 May 2019 20:39:59 -0500 Subject: [PATCH 15/43] development-utils: install CocoaPods --- development-utils.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/development-utils.sh b/development-utils.sh index 6f1da93..ff83980 100755 --- a/development-utils.sh +++ b/development-utils.sh @@ -18,6 +18,15 @@ else echo '==> Skipping Xcode command line tools' fi +echo '==> Install CocoaPods? (Y/n)' +read USER_PROMPT +if [ "$USER_PROMPT" = 'y' ] || [ "$USER_PROMPT" = '' ]; then + echo '==> Installing CocoaPods...' + sudo gem install cocoapods +else + echo '==> Skipping CocoaPods' +fi + if ! command -v 'brew' >/dev/null 2>&1 ; then echo '==> Install Homebrew? (Y/n)' read USER_PROMPT From 3fae9d59f860b6ff102848baeda766453ffcad88 Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Tue, 9 Apr 2019 06:26:32 -0500 Subject: [PATCH 16/43] Refactor scripts --- android-development.sh | 28 ++++--- angular.sh | 17 +++-- bootstrap.sh | 34 +++++---- brew.sh | 6 +- development-utils.sh | 163 ++++++++++++++++++++++------------------- fts/bootstrap.sh | 30 -------- fts/dimension.sh | 33 --------- gnu-utils.sh | 17 +++-- gui-applications.sh | 20 +++-- ionic-projects.sh | 31 +++++--- ionic.sh | 18 +++-- macos-tweaks.sh | 4 +- nodejs.sh | 30 +++++--- 13 files changed, 212 insertions(+), 219 deletions(-) delete mode 100755 fts/bootstrap.sh delete mode 100755 fts/dimension.sh diff --git a/android-development.sh b/android-development.sh index 048baf1..2e7302f 100755 --- a/android-development.sh +++ b/android-development.sh @@ -5,21 +5,29 @@ # Exit immediately if a command exits with a non-zero status set -e -# Update the user's cached credentials, authenticating the user if necessary -sudo -v +# Store a local variable of the scripts current directory +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -if ! command -v 'brew' >/dev/null 2>&1 ; then - echo '==> Homebrew not found. Installing now...' - ./brew.sh +if ! command -v "brew" > /dev/null 2>&1; then + echo "==> Homebrew not found. Installing now..." + ${DIR}/brew.sh fi -if command -v 'brew' >/dev/null 2>&1 ; then - echo '==> Installing Android development environment...' +if command -v "brew" > /dev/null 2>&1; then + echo "==> Installing Android development environment..." + brew cask install android-studio - echo 'export PATH=$PATH:$HOME/Library/Android/sdk/platform-tools/' >> ~/.bash_profile - echo 'export PATH=$PATH:$HOME/Library/Android/sdk/tools/' >> ~/.bash_profile + echo "export PATH=$PATH:$HOME/Library/Android/sdk/platform-tools/" >> ~/.bash_profile + echo "export PATH=$PATH:$HOME/Library/Android/sdk/tools/" >> ~/.bash_profile + echo "\n" >> ~/.bash_profile + + echo "export PATH=$PATH:$HOME/Library/Android/sdk/platform-tools/" >> ~/.zlogin + echo "export PATH=$PATH:$HOME/Library/Android/sdk/tools/" >> ~/.zlogin + echo "\n" >> ~/.zlogin + + echo "==> Android development environment installed." else - echo '==> Homebrew not found. Aborting...' + echo "==> Homebrew not found. Aborting..." exit 1 fi diff --git a/angular.sh b/angular.sh index 71f0b0a..b43517c 100755 --- a/angular.sh +++ b/angular.sh @@ -5,18 +5,19 @@ # Exit immediately if a command exits with a non-zero status set -e -# Update the user's cached credentials, authenticating the user if necessary -sudo -v +# Store a local variable of the scripts current directory +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -if ! command -v 'npm' >/dev/null 2>&1 ; then - echo '==> NPM not installed. Installing Node.js now...' - ./nodejs.sh +if ! command -v "npm" > /dev/null 2>&1; then + echo "==> NPM not installed. Installing Node.js now..." + ${DIR}/nodejs.sh fi -if command -v 'npm' >/dev/null 2>&1 ; then - echo '==> Installing Angular CLI...' +if command -v "npm" > /dev/null 2>&1; then + echo "==> Installing Angular CLI..." npm install -g @angular/cli + echo "==> Angular CLI installed." else - echo '==> NPM not installed. Aborting...' + echo "==> NPM not installed. Aborting..." exit 1 fi diff --git a/bootstrap.sh b/bootstrap.sh index ccf3a8c..ef4cae1 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -8,36 +8,40 @@ set -e # Update the user's cached credentials, authenticating the user if necessary sudo -v -echo '==> Install macOS updates? (Y/n)' +# Store a local variable of the scripts current directory +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +echo "==> Install macOS updates? (Y/n)" read USER_PROMPT -if [ "$USER_PROMPT" == 'y' ] || [ "$USER_PROMPT" == '' ]; then +if [[ "$USER_PROMPT" == 'y' ]] || [[ "$USER_PROMPT" == '' ]]; then echo "==> Updating macOS..." softwareupdate -l softwareupdate -i -a + echo "==> macOS updated installed." else - echo '==> Skipping macOS updates' + echo "==> Skipping macOS updates." fi -echo '==> Install macOS tweaks? (Y/n)' +echo "==> Install macOS tweaks? (Y/n)" read USER_PROMPT -if [ "$USER_PROMPT" == 'y' ] || [ "$USER_PROMPT" == '' ]; then - ./macos-tweaks.sh +if [[ "$USER_PROMPT" == 'y' ]] || [[ "$USER_PROMPT" == '' ]]; then + ${DIR}/macos-tweaks.sh else - echo '==> Skipping macOS tweaks' + echo "==> Skipping macOS tweaks." fi -echo '==> Install user applications? (Y/n)' +echo "==> Install user applications? (Y/n)" read USER_PROMPT -if [ "$USER_PROMPT" == 'y' ] || [ "$USER_PROMPT" == '' ]; then - ./gui-applications.sh +if [[ "$USER_PROMPT" == 'y' ]] || [[ "$USER_PROMPT" == '' ]]; then + ${DIR}/gui-applications.sh else - echo '==> Skipping user applications' + echo "==> Skipping user applications." fi -echo '==> Install development utilities? (Y/n)' +echo "==> Install development utilities? (Y/n)" read USER_PROMPT -if [ "$USER_PROMPT" == 'y' ] || [ "$USER_PROMPT" == '' ]; then - ./development-utils.sh +if [[ "$USER_PROMPT" == 'y' ]] || [[ "$USER_PROMPT" == '' ]]; then + ${DIR}/development-utils.sh else - echo '==> Skipping development utilities' + echo "==> Skipping development utilities." fi diff --git a/brew.sh b/brew.sh index 8a0a428..972678a 100755 --- a/brew.sh +++ b/brew.sh @@ -5,8 +5,6 @@ # Exit immediately if a command exits with a non-zero status set -e -# Update the user's cached credentials, authenticating the user if necessary -sudo -v - -echo '==> Installing Homebrew...' +echo "==> Installing Homebrew..." /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" +echo "==> Homebrew installed." diff --git a/development-utils.sh b/development-utils.sh index ff83980..fd4cc0f 100755 --- a/development-utils.sh +++ b/development-utils.sh @@ -8,127 +8,136 @@ set -e # Update the user's cached credentials, authenticating the user if necessary sudo -v -echo '==> Install Xcode command line tools? (Y/n)' +# Store a local variable of the scripts current directory +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +echo "==> Install Xcode command line tools? (Y/n)" read USER_PROMPT -if [ "$USER_PROMPT" = 'y' ] || [ "$USER_PROMPT" = '' ]; then - echo '==> Installing Xcode command line tools...' +if [[ "$USER_PROMPT" = 'y' ]] || [[ "$USER_PROMPT" = '' ]]; then + echo "==> Installing Xcode command line tools..." xcode-select --install sudo xcode-select -s /Applications/Xcode.app/Contents/Developer + echo "==> Xcode command line tools installed." else - echo '==> Skipping Xcode command line tools' + echo "==> Skip installing Xcode command line tools." fi -echo '==> Install CocoaPods? (Y/n)' +echo "==> Install CocoaPods? (Y/n)" read USER_PROMPT -if [ "$USER_PROMPT" = 'y' ] || [ "$USER_PROMPT" = '' ]; then - echo '==> Installing CocoaPods...' +if [[ "$USER_PROMPT" = 'y' ]] || [[ "$USER_PROMPT" = '' ]]; then + echo "==> Installing CocoaPods..." sudo gem install cocoapods + echo "==> CocoaPods installed." else - echo '==> Skipping CocoaPods' + echo "==> Skipping CocoaPods." fi -if ! command -v 'brew' >/dev/null 2>&1 ; then - echo '==> Install Homebrew? (Y/n)' +if ! command -v "brew" > /dev/null 2>&1; then + echo "==> Install Homebrew? (Y/n)" read USER_PROMPT - if [ "$USER_PROMPT" = 'y' ] || [ "$USER_PROMPT" = '' ]; then - ./brew.sh + if [[ "$USER_PROMPT" = 'y' ]] || [[ "$USER_PROMPT" = '' ]]; then + ${DIV}/brew.sh else - echo '==> Skipping Homebrew' + echo "==> Skipping Homebrew." fi fi -echo '==> Tap Homebrew Caskroom? (Y/n)' -read USER_PROMPT -if [ "$USER_PROMPT" = 'y' ] || [ "$USER_PROMPT" = '' ]; then - echo '==> Tapping Homebrew Caskroom...' - - brew tap caskroom/cask - brew tap caskroom/versions -else - echo '==> Skipping Homebrew Cask' -fi - -echo '==> Install updated GNU utilities? (Y/n)' +echo "==> Install updated GNU utilities? (Y/n)" read USER_PROMPT -if [ "$USER_PROMPT" = 'y' ] || [ "$USER_PROMPT" = '' ]; then - ./gnu-utils.sh +if [[ "$USER_PROMPT" = 'y' ]] || [[ "$USER_PROMPT" = '' ]]; then + ${DIV}/gnu-utils.sh else - echo '==> Skipping updated GNU utilities' + echo "==> Skipping updated GNU utilities." fi -echo '==> Install development applications? (Y/n)' +echo "==> Install development applications? (Y/n)" read USER_PROMPT -if [ "$USER_PROMPT" = 'y' ] || [ "$USER_PROMPT" = '' ]; then - echo '==> Installing development applications...' +if [[ "$USER_PROMPT" = 'y' ]] || [[ "$USER_PROMPT" = '' ]]; then + echo "==> Installing development applications..." brew install git - brew cask install docker gitkraken intellij-idea iterm2 postman visual-studio-code -else - echo '==> Skipping development applications' -fi -echo '==> Install Node.js? (Y/n)' -read USER_PROMPT -if [ "$USER_PROMPT" = 'y' ] || [ "$USER_PROMPT" = '' ]; then - ./nodejs.sh + brew cask install \ + docker \ + gitkraken \ + intellij-idea \ + iterm2 \ + postman \ + visual-studio-code else - echo '==> Skipping Node.js' + echo "==> Skipping development applications." fi -echo '==> Install Ionic? (Y/n)' -read USER_PROMPT -if [ "$USER_PROMPT" = 'y' ] || [ "$USER_PROMPT" = '' ]; then - ./ionic.sh +if ! command -v "node" > /dev/null 2>&1; then + echo "==> Install Node.js? (Y/n)" + read USER_PROMPT + if [[ "$USER_PROMPT" = 'y' ]] || [[ "$USER_PROMPT" = '' ]]; then + ${DIV}/nodejs.sh + else + echo "==> Skipping Node.js." + fi +fi - echo '==> Clone Ionic projects? (Y/n)' +if ! command -v "ionic" > /dev/null 2>&1; then + echo "==> Install Ionic? (Y/n)" read USER_PROMPT - if [ "$USER_PROMPT" = 'y' ] || [ "$USER_PROMPT" = '' ]; then - ./ionic-projects.sh + if [[ "$USER_PROMPT" = 'y' ]] || [[ "$USER_PROMPT" = '' ]]; then + ${DIV}/ionic.sh + + echo "==> Clone Ionic projects? (Y/n)" + read USER_PROMPT + if [[ "$USER_PROMPT" = 'y' ]] || [[ "$USER_PROMPT" = '' ]]; then + ${DIV}/ionic-projects.sh + else + echo "==> Skip cloning Ionic projects." + fi else - echo '==> Skipping Ionic projects' + echo "==> Skipping Ionic." fi -else - echo '==> Skipping Ionic' fi -echo '==> Install Angular? (Y/n)' -read USER_PROMPT -if [ "$USER_PROMPT" = 'y' ] || [ "$USER_PROMPT" = '' ]; then - ./angular.sh - - # echo '==> Clone Angular projects? (Y/n)' - # read USER_PROMPT - # if [ "$USER_PROMPT" = 'y' ] || [ "$USER_PROMPT" = '' ]; then - # ./angular-projects.sh - # else - # echo '==> Skipping Angular projects' - # fi -else - echo '==> Skipping Angular' +if ! command -v "ng" > /dev/null 2>&1; then + echo "==> Install Angular? (Y/n)" + read USER_PROMPT + if [[ "$USER_PROMPT" = 'y' ]] || [[ "$USER_PROMPT" = '' ]]; then + ${DIV}/angular.sh + + # echo "==> Clone Angular projects? (Y/n)" + # read USER_PROMPT + # if [[ "$USER_PROMPT" = 'y' ]] || [[ "$USER_PROMPT" = '' ]]; then + # ${DIV}/angular-projects.sh + # else + # echo "==> Skip cloning Angular projects." + # fi + else + echo "==> Skipping Angular." + fi fi -echo '==> Install Java 8? (Y/n)' +echo "==> Install Java 8? (Y/n)" read USER_PROMPT -if [ "$USER_PROMPT" = 'y' ] || [ "$USER_PROMPT" = 'yes' ] || [ "$USER_PROMPT" = '' ]; then - if ! command -v 'brew' >/dev/null 2>&1 ; then - echo '==> Homebrew not found. Installing now...' - ./brew.sh +if [[ "$USER_PROMPT" = 'y' ]] || [[ "$USER_PROMPT" = 'yes' ]] || [[ "$USER_PROMPT" = '' ]]; then + if ! command -v "brew" > /dev/null 2>&1; then + echo "==> Homebrew not found. Installing now..." + ${DIV}/brew.sh fi - if command -v 'brew' >/dev/null 2>&1 ; then - echo '==> Installing Java 8...' + if command -v "brew" > /dev/null 2>&1; then + echo "==> Installing Java 8..." brew cask install java8 else - echo '==> Homebrew not found. Aborting...' + echo "==> Homebrew not found. Aborting..." exit 1 fi else - echo '==> Skipping Java 8' + echo "==> Skipping Java 8." fi -echo '==> Install Android development environment? (Y/n)' +echo "==> Install Android development environment? (Y/n)" read USER_PROMPT -if [ "$USER_PROMPT" = 'y' ] || [ "$USER_PROMPT" = '' ]; then - ./android-development.sh +if [[ "$USER_PROMPT" = 'y' ]] || [[ "$USER_PROMPT" = '' ]]; then + ${DIV}/android-development.sh else - echo '==> Skipping Android development environment' + echo "==> Skipping Android development environment." fi + +echo "==> Development utilities installed." diff --git a/fts/bootstrap.sh b/fts/bootstrap.sh deleted file mode 100755 index 0bc960f..0000000 --- a/fts/bootstrap.sh +++ /dev/null @@ -1,30 +0,0 @@ -# Install FTS Packages - -echo '==> Install TunnelBlick VPN client? (Y/n)' -read INSTALL_MACOS_UPDATES -if [ "$INSTALL_MACOS_UPDATES" = 'y' ] || [ "$INSTALL_MACOS_UPDATES" = 'yes' ] || [ "$INSTALL_MACOS_UPDATES" = '' ]; then - brew cask install tunnelblick -else - echo '==> Skipping TunnelBlick' -fi - -echo '==> Did you set up your SSH key yet? (Y/n)' -read SSH_KEY -if [ "$SSH_KEY" = 'y' ] || [ "$SSH_KEY" = 'yes' ] || [ "$SSH_KEY" = '' ]; then - echo '==> Clone FTS source code? (Y/n)' - read FTS_SOURCE - if [ "$FTS_SOURCE" = 'y' ] || [ "$FTS_SOURCE" = 'yes' ] || [ "$FTS_SOURCE" = '' ]; then - mkdir -p ~/code/fts - cd ~/code/fts - git clone git@github.com:sporting-innovations/fan360Core.git - git clone git@github.com:sporting-innovations/global-ref-data.git - git clone git@github.com:sporting-innovations/fan360-dimension.git - git clone git@github.com:sporting-innovations/si-dimension.git - git clone git@github.com:sporting-innovations/fan-classification.git - git clone git@github.com:sporting-innovations/fan360-communications.git - git clone git@github.com:sporting-innovations/fan360-triggers.git - else - echo '==> Skipping FTS source code' - fi - -fi diff --git a/fts/dimension.sh b/fts/dimension.sh deleted file mode 100755 index 83cb08e..0000000 --- a/fts/dimension.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh - -echo '==> Checking if Homebrew is installed...' -which -s brew -if [[ $? != 0 ]] ; then - # Install Homebrew - echo '==> Homebrew not found, install Homebrew? (Y/n)' - read INSTALL_HOMEBREW - if [ "$INSTALL_HOMEBREW" = 'y' ] || [ "$INSTALL_HOMEBREW" = 'yes' ] || [ "$INSTALL_HOMEBREW" = '' ]; then - # Install Homebrew - /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" - else - echo '==> Skipping Homebrew' - fi -else - echo '==> Homebrew found, updating packages' - brew update -fi - -echo '==> Installing required Homebrew packages' -brew install maven nvm tomcat - -echo '==> Installing Node.js...' -nvm install --lts=Boron - -echo '==> Installing required NPM packages...' -npm install -g bower gulp nodemon - -mkdir -p ~/code/fts -cd ~/code/fts - -git clone git@github.com:sporting-innovations/fan360-dimension.git -git clone git@github.com:sporting-innovations/si-dimension.git diff --git a/gnu-utils.sh b/gnu-utils.sh index eaa3fda..dd7a853 100755 --- a/gnu-utils.sh +++ b/gnu-utils.sh @@ -8,13 +8,16 @@ set -e # Update the user's cached credentials, authenticating the user if necessary sudo -v -if ! command -v brew >/dev/null 2>&1 ; then - echo '==> Homebrew not found. Installing now...' - ./brew.sh +# Store a local variable of the scripts current directory +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +if ! command -v "brew" > /dev/null 2>&1; then + echo "==> Homebrew not found. Installing now..." + ${DIV}/brew.sh fi -if command -v 'brew' >/dev/null 2>&1 ; then - echo '==> Installing updated GNU utilities...' +if command -v "brew" > /dev/null 2>&1; then + echo "==> Installing updated GNU utilities..." # Install current version of bash brew install bash @@ -23,7 +26,9 @@ if command -v 'brew' >/dev/null 2>&1 ; then brew install grep --with-default-names brew install gnu-sed --with-default-names brew install moreutils + + echo "==> Updated GNU utilities installed." else - echo '==> Homebrew not found. Aborting...' + echo "==> Homebrew not found. Aborting..." exit 1 fi diff --git a/gui-applications.sh b/gui-applications.sh index 180b2e5..4c87bd0 100755 --- a/gui-applications.sh +++ b/gui-applications.sh @@ -8,19 +8,24 @@ set -e # Update the user's cached credentials, authenticating the user if necessary sudo -v -if ! command -v 'brew' >/dev/null 2>&1 ; then - echo '==> Homebrew not found. Installing now...' - ./brew.sh +# Store a local variable of the scripts current directory +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +if ! command -v "brew" > /dev/null 2>&1; then + echo "==> Homebrew not found. Installing now..." + ${DIV}/brew.sh fi -if command -v 'brew' >/dev/null 2>&1 ; then - echo '==> Installing user applications...' +if command -v "brew" > /dev/null 2>&1; then + echo "==> Installing user applications..." + brew cask install \ alfred \ android-file-transfer \ caffeine \ clover-configurator \ - eqmac firefox \ + eqmac \ + firefox \ google-chrome \ keka \ plex-media-server \ @@ -29,7 +34,8 @@ if command -v 'brew' >/dev/null 2>&1 ; then telegram-desktop \ transmission vlc \ + echo "==> User applications installed." else - echo '==> Homebrew not found. Aborting...' + echo "==> Homebrew not found. Aborting..." exit 1 fi diff --git a/ionic-projects.sh b/ionic-projects.sh index 2066089..1879d97 100755 --- a/ionic-projects.sh +++ b/ionic-projects.sh @@ -8,25 +8,34 @@ set -e # Update the user's cached credentials, authenticating the user if necessary sudo -v -if ! command -v brew >/dev/null 2>&1 ; then - echo '==> Homebrew not found. Installing now...' - ./brew.sh +# Store a local variable of the scripts current directory +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +if ! command -v "brew" > /dev/null 2>&1; then + echo "==> Homebrew not found. Installing now..." + ${DIV}/brew.sh fi -if command -v 'brew' >/dev/null 2>&1 ; then - echo '==> Installing CouchDB...' +if command -v "brew" > /dev/null 2>&1; then + echo "==> Installing CouchDB..." brew install couchdb brew services start couchdb + echo "==> CouchDB installed." - echo '==> Adding CORS to CouchDB...' + echo "==> Adding CORS to CouchDB..." npm install -g add-cors-to-couchdb add-cors-to-couchdb + echo "==> CORS added to CouchDB." - if ! command -v 'git' >/dev/null 2>&1 ; then + if ! command -v "git" > /dev/null 2>&1; then + echo "==> Installing Git..." brew install git + echo "==> Git installed." fi - if command -v 'git' >/dev/null 2>&1 ; then + if command -v "git" > /dev/null 2>&1; then + echo "==> Cloning Ionic projects..." + # Create Source Code Directory mkdir -p ~/code/ionic cd ~/code/ionic @@ -36,11 +45,13 @@ if command -v 'brew' >/dev/null 2>&1 ; then git clone https://github.com/dshoe/CryptoProfitLog.git git clone https://github.com/dshoe/DaysSince.git git clone https://github.com/dshoe/WaterWatch.git + + echo "==> Ionic projects cloned." else - echo '==> Git not found. Aborting...' + echo "==> Git not found. Aborting..." exit 1 fi else - echo '==> Homebrew not found. Aborting...' + echo "==> Homebrew not found. Aborting..." exit 1 fi diff --git a/ionic.sh b/ionic.sh index 05578c9..afc2dad 100755 --- a/ionic.sh +++ b/ionic.sh @@ -8,15 +8,19 @@ set -e # Update the user's cached credentials, authenticating the user if necessary sudo -v -if ! command -v 'npm' >/dev/null 2>&1 ; then - echo '==> NPM not installed. Installing Node.js now...' - ./nodejs.sh +# Store a local variable of the scripts current directory +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +if ! command -v "npm" > /dev/null 2>&1; then + echo "==> NPM not installed. Installing Node.js now..." + ${DIV}/nodejs.sh fi -if command -v 'npm' >/dev/null 2>&1 ; then - echo '==> Installing Ionic CLI...' - npm install -g ionic cordova +if command -v "npm" > /dev/null 2>&1; then + echo "==> Installing Ionic CLI..." + npm install -g ionic + echo "==> Ionic CLI installed." else - echo '==> NPM not installed. Aborting...' + echo "==> NPM not installed. Aborting..." exit 1 fi diff --git a/macos-tweaks.sh b/macos-tweaks.sh index 7a4341e..cecd6bd 100755 --- a/macos-tweaks.sh +++ b/macos-tweaks.sh @@ -5,7 +5,7 @@ # Exit immediately if a command exits with a non-zero status set -e -echo '==> Tweaking macOS settings...' +echo "==> Tweaking macOS settings..." ############################################################################### # General # @@ -97,4 +97,4 @@ for app in "Dock" \ killall "${app}" &> /dev/null done -echo '==> Done tweaking macOS settings' +echo "==> Done tweaking macOS settings" diff --git a/nodejs.sh b/nodejs.sh index c97a234..9b718a0 100755 --- a/nodejs.sh +++ b/nodejs.sh @@ -9,14 +9,18 @@ # Update the user's cached credentials, authenticating the user if necessary sudo -v -if ! command -v brew >/dev/null 2>&1 ; then - echo '==> Homebrew not found. Installing now...' - ./brew.sh +# Store a local variable of the scripts current directory +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +if ! command -v "brew" > /dev/null 2>&1; then + echo "==> Homebrew not found. Installing now..." + ${DIV}/brew.sh fi -if command -v 'brew' >/dev/null 2>&1 ; then +if command -v "brew" > /dev/null 2>&1; then + echo "==> Installing Node Version Manager..." + # Install Node Version Manager - echo "==> Installing NVM..." brew install nvm # Allow NVM without restarting @@ -25,17 +29,23 @@ if command -v 'brew' >/dev/null 2>&1 ; then [ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion" # This loads nvm bash_completion # Allow NVM after restarting - echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.bash_profile - echo '[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh"' >> ~/.bash_profile - echo '[ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion"' >> ~/.bash_profile + echo "export NVM_DIR="$HOME/.nvm"" >> ~/.bash_profile + echo "[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh"" >> ~/.bash_profile + echo "[ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion"" >> ~/.bash_profile + echo "\n" >> ~/.bash_profile + + echo "export NVM_DIR="$HOME/.nvm"" >> ~/.zlogin + echo "[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh"" >> ~/.zlogin + echo "[ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion"" >> ~/.zlogin + echo "\n" >> ~/.zlogin - echo "==> NVM installed." + echo "==> Node Version Manager installed." # Install latest Node.js with NVM echo "==> Installing latest Node.js LTS..." nvm install --lts echo "==> Latest Node.js LTS installed." else - echo '==> Homebrew not found. Aborting...' + echo "==> Homebrew not found. Aborting..." exit 1 fi From 7c40b2846fe7fea8712bd7ccf07e1a143518a553 Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Sun, 9 Jun 2019 17:36:08 -0500 Subject: [PATCH 17/43] Add scripts for ZSH and Oh My Zsh --- oh-my-zsh-plugins.sh | 16 ++++++++++++++++ zsh.sh | 26 ++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100755 oh-my-zsh-plugins.sh create mode 100755 zsh.sh diff --git a/oh-my-zsh-plugins.sh b/oh-my-zsh-plugins.sh new file mode 100755 index 0000000..47d1c7f --- /dev/null +++ b/oh-my-zsh-plugins.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +# Configure Oh My Zsh plugins + +# Exit immediately if a command exits with a non-zero status +set -e + +# Store a local variable of the scripts current directory +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +if [[ -f "~/.zshrc" ]]; then + sed -i -e 's/plugins=(git)/plugins=(git mvn nvm z)/g' ~/.zshrc +else + echo "==> .zshrc not found, Oh My Zsh possibly not installed. Aborting." + exit 1 +fi diff --git a/zsh.sh b/zsh.sh new file mode 100755 index 0000000..f9a1ed6 --- /dev/null +++ b/zsh.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +# Install updated ZSH and Oh My Zsh + +# Exit immediately if a command exits with a non-zero status +set -e + +# Store a local variable of the scripts current directory +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +if ! command -v "brew" > /dev/null 2>&1; then + echo "==> Homebrew not found. Installing now..." + ${DIV}/brew.sh +fi + +if command -v "brew" > /dev/null 2>&1; then + echo "==> Installing updated ZSH..." + brew install zsh zsh-completions + echo "==> Updated ZSH installed." + + echo "export EDITOR=nano" >> ~/.zlogin + echo "\n" >> ~/.zlogin + + echo "==> Installing Oh My Zsh..." + sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" +fi From c489aea1c53c8d6f0e6ca8f75e09be35e278b986 Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Sun, 9 Jun 2019 17:39:47 -0500 Subject: [PATCH 18/43] Create dedicated script for installing Java 8 --- development-utils.sh | 13 +------------ java8.sh | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 12 deletions(-) create mode 100755 java8.sh diff --git a/development-utils.sh b/development-utils.sh index fd4cc0f..4c4b855 100755 --- a/development-utils.sh +++ b/development-utils.sh @@ -116,18 +116,7 @@ fi echo "==> Install Java 8? (Y/n)" read USER_PROMPT if [[ "$USER_PROMPT" = 'y' ]] || [[ "$USER_PROMPT" = 'yes' ]] || [[ "$USER_PROMPT" = '' ]]; then - if ! command -v "brew" > /dev/null 2>&1; then - echo "==> Homebrew not found. Installing now..." - ${DIV}/brew.sh - fi - - if command -v "brew" > /dev/null 2>&1; then - echo "==> Installing Java 8..." - brew cask install java8 - else - echo "==> Homebrew not found. Aborting..." - exit 1 - fi + ${DIR}/java8.sh else echo "==> Skipping Java 8." fi diff --git a/java8.sh b/java8.sh new file mode 100755 index 0000000..8ea1e3c --- /dev/null +++ b/java8.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +# Install Java 8 + +# Exit immediately if a command exits with a non-zero status +set -e + +# Store a local variable of the scripts current directory +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +if ! command -v "brew" > /dev/null 2>&1; then + echo "==> Homebrew not found. Installing now..." + ${DIV}/brew.sh +fi + +if command -v "brew" > /dev/null 2>&1; then + echo "==> Tapping OpenJDK..." + brew tap adoptopenjdk/openjdk + echo "==> OpenJDK tapped." + + echo "==> Installing OpenJDK 8..." + brew cask install adoptopenjdk8 + echo "==> OpenJDK 8 installed." +fi From 8757dabeaa07230b9400cb791945f62b5b56ee06 Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Sun, 9 Jun 2019 17:43:53 -0500 Subject: [PATCH 19/43] Wording updates --- bootstrap.sh | 8 ++++---- development-utils.sh | 18 +++++++++--------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index ef4cae1..b230c0f 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -19,7 +19,7 @@ if [[ "$USER_PROMPT" == 'y' ]] || [[ "$USER_PROMPT" == '' ]]; then softwareupdate -i -a echo "==> macOS updated installed." else - echo "==> Skipping macOS updates." + echo "==> Skip installing macOS updates." fi echo "==> Install macOS tweaks? (Y/n)" @@ -27,7 +27,7 @@ read USER_PROMPT if [[ "$USER_PROMPT" == 'y' ]] || [[ "$USER_PROMPT" == '' ]]; then ${DIR}/macos-tweaks.sh else - echo "==> Skipping macOS tweaks." + echo "==> Skip installing macOS tweaks." fi echo "==> Install user applications? (Y/n)" @@ -35,7 +35,7 @@ read USER_PROMPT if [[ "$USER_PROMPT" == 'y' ]] || [[ "$USER_PROMPT" == '' ]]; then ${DIR}/gui-applications.sh else - echo "==> Skipping user applications." + echo "==> Skip installing user applications." fi echo "==> Install development utilities? (Y/n)" @@ -43,5 +43,5 @@ read USER_PROMPT if [[ "$USER_PROMPT" == 'y' ]] || [[ "$USER_PROMPT" == '' ]]; then ${DIR}/development-utils.sh else - echo "==> Skipping development utilities." + echo "==> Skip installing development utilities." fi diff --git a/development-utils.sh b/development-utils.sh index 4c4b855..1daf42c 100755 --- a/development-utils.sh +++ b/development-utils.sh @@ -29,7 +29,7 @@ if [[ "$USER_PROMPT" = 'y' ]] || [[ "$USER_PROMPT" = '' ]]; then sudo gem install cocoapods echo "==> CocoaPods installed." else - echo "==> Skipping CocoaPods." + echo "==> Skip installing CocoaPods." fi if ! command -v "brew" > /dev/null 2>&1; then @@ -38,7 +38,7 @@ if ! command -v "brew" > /dev/null 2>&1; then if [[ "$USER_PROMPT" = 'y' ]] || [[ "$USER_PROMPT" = '' ]]; then ${DIV}/brew.sh else - echo "==> Skipping Homebrew." + echo "==> Skip installing Homebrew." fi fi @@ -47,7 +47,7 @@ read USER_PROMPT if [[ "$USER_PROMPT" = 'y' ]] || [[ "$USER_PROMPT" = '' ]]; then ${DIV}/gnu-utils.sh else - echo "==> Skipping updated GNU utilities." + echo "==> Skip installing updated GNU utilities." fi echo "==> Install development applications? (Y/n)" @@ -64,7 +64,7 @@ if [[ "$USER_PROMPT" = 'y' ]] || [[ "$USER_PROMPT" = '' ]]; then postman \ visual-studio-code else - echo "==> Skipping development applications." + echo "==> Skip installing development applications." fi if ! command -v "node" > /dev/null 2>&1; then @@ -73,7 +73,7 @@ if ! command -v "node" > /dev/null 2>&1; then if [[ "$USER_PROMPT" = 'y' ]] || [[ "$USER_PROMPT" = '' ]]; then ${DIV}/nodejs.sh else - echo "==> Skipping Node.js." + echo "==> Skip installing Node.js." fi fi @@ -91,7 +91,7 @@ if ! command -v "ionic" > /dev/null 2>&1; then echo "==> Skip cloning Ionic projects." fi else - echo "==> Skipping Ionic." + echo "==> Skip installing Ionic CLI." fi fi @@ -109,7 +109,7 @@ if ! command -v "ng" > /dev/null 2>&1; then # echo "==> Skip cloning Angular projects." # fi else - echo "==> Skipping Angular." + echo "==> Skip installing Angular CLI." fi fi @@ -118,7 +118,7 @@ read USER_PROMPT if [[ "$USER_PROMPT" = 'y' ]] || [[ "$USER_PROMPT" = 'yes' ]] || [[ "$USER_PROMPT" = '' ]]; then ${DIR}/java8.sh else - echo "==> Skipping Java 8." + echo "==> Skip installing Java 8." fi echo "==> Install Android development environment? (Y/n)" @@ -126,7 +126,7 @@ read USER_PROMPT if [[ "$USER_PROMPT" = 'y' ]] || [[ "$USER_PROMPT" = '' ]]; then ${DIV}/android-development.sh else - echo "==> Skipping Android development environment." + echo "==> Skip installing Android development environment." fi echo "==> Development utilities installed." From 55778c2505e01dcdd49018df7b05ec29f2f9b745 Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Mon, 10 Jun 2019 07:00:34 -0500 Subject: [PATCH 20/43] Use `.zshenv` instead of `.zlogin` `.zshenv` seems like a more proper place to store these configurations, and I was having some issues with NVM not using my default Node version when using `.zlogin`. More information about ZSH startup files: http://zsh.sourceforge.net/Intro/intro_3.html --- android-development.sh | 6 +++--- nodejs.sh | 8 ++++---- zsh.sh | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/android-development.sh b/android-development.sh index 2e7302f..0e41cf8 100755 --- a/android-development.sh +++ b/android-development.sh @@ -22,9 +22,9 @@ if command -v "brew" > /dev/null 2>&1; then echo "export PATH=$PATH:$HOME/Library/Android/sdk/tools/" >> ~/.bash_profile echo "\n" >> ~/.bash_profile - echo "export PATH=$PATH:$HOME/Library/Android/sdk/platform-tools/" >> ~/.zlogin - echo "export PATH=$PATH:$HOME/Library/Android/sdk/tools/" >> ~/.zlogin - echo "\n" >> ~/.zlogin + echo "export PATH=$PATH:$HOME/Library/Android/sdk/platform-tools/" >> ~/.zshenv + echo "export PATH=$PATH:$HOME/Library/Android/sdk/tools/" >> ~/.zshenv + echo "\n" >> ~/.zshenv echo "==> Android development environment installed." else diff --git a/nodejs.sh b/nodejs.sh index 9b718a0..0d34fa0 100755 --- a/nodejs.sh +++ b/nodejs.sh @@ -34,10 +34,10 @@ if command -v "brew" > /dev/null 2>&1; then echo "[ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion"" >> ~/.bash_profile echo "\n" >> ~/.bash_profile - echo "export NVM_DIR="$HOME/.nvm"" >> ~/.zlogin - echo "[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh"" >> ~/.zlogin - echo "[ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion"" >> ~/.zlogin - echo "\n" >> ~/.zlogin + echo "export NVM_DIR="$HOME/.nvm"" >> ~/.zshenv + echo "[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh"" >> ~/.zshenv + echo "[ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion"" >> ~/.zshenv + echo "\n" >> ~/.zshenv echo "==> Node Version Manager installed." diff --git a/zsh.sh b/zsh.sh index f9a1ed6..bf1087b 100755 --- a/zsh.sh +++ b/zsh.sh @@ -18,8 +18,8 @@ if command -v "brew" > /dev/null 2>&1; then brew install zsh zsh-completions echo "==> Updated ZSH installed." - echo "export EDITOR=nano" >> ~/.zlogin - echo "\n" >> ~/.zlogin + echo "export EDITOR=nano" >> ~/.zshenv + echo "\n" >> ~/.zshenv echo "==> Installing Oh My Zsh..." sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" From 11e5cf433c22e633fe47a151ea5fc9cf1ca5af7f Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Mon, 10 Jun 2019 07:03:56 -0500 Subject: [PATCH 21/43] Use single quotes when appending shell startup scripts Double quotes allow for interpolation which we do not want here. --- android-development.sh | 12 ++++++------ nodejs.sh | 18 +++++++++--------- zsh.sh | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/android-development.sh b/android-development.sh index 0e41cf8..98363f2 100755 --- a/android-development.sh +++ b/android-development.sh @@ -18,13 +18,13 @@ if command -v "brew" > /dev/null 2>&1; then brew cask install android-studio - echo "export PATH=$PATH:$HOME/Library/Android/sdk/platform-tools/" >> ~/.bash_profile - echo "export PATH=$PATH:$HOME/Library/Android/sdk/tools/" >> ~/.bash_profile - echo "\n" >> ~/.bash_profile + echo 'export PATH=$PATH:$HOME/Library/Android/sdk/platform-tools/' >> ~/.bash_profile + echo 'export PATH=$PATH:$HOME/Library/Android/sdk/tools/' >> ~/.bash_profile + echo '\n' >> ~/.bash_profile - echo "export PATH=$PATH:$HOME/Library/Android/sdk/platform-tools/" >> ~/.zshenv - echo "export PATH=$PATH:$HOME/Library/Android/sdk/tools/" >> ~/.zshenv - echo "\n" >> ~/.zshenv + echo 'export PATH=$PATH:$HOME/Library/Android/sdk/platform-tools/' >> ~/.zshenv + echo 'export PATH=$PATH:$HOME/Library/Android/sdk/tools/' >> ~/.zshenv + echo '\n' >> ~/.zshenv echo "==> Android development environment installed." else diff --git a/nodejs.sh b/nodejs.sh index 0d34fa0..2340c3a 100755 --- a/nodejs.sh +++ b/nodejs.sh @@ -29,15 +29,15 @@ if command -v "brew" > /dev/null 2>&1; then [ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion" # This loads nvm bash_completion # Allow NVM after restarting - echo "export NVM_DIR="$HOME/.nvm"" >> ~/.bash_profile - echo "[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh"" >> ~/.bash_profile - echo "[ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion"" >> ~/.bash_profile - echo "\n" >> ~/.bash_profile - - echo "export NVM_DIR="$HOME/.nvm"" >> ~/.zshenv - echo "[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh"" >> ~/.zshenv - echo "[ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion"" >> ~/.zshenv - echo "\n" >> ~/.zshenv + echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.bash_profile + echo '[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh"' >> ~/.bash_profile + echo '[ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion"' >> ~/.bash_profile + echo '\n' >> ~/.bash_profile + + echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.zshenv + echo '[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh"' >> ~/.zshenv + echo '[ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion"' >> ~/.zshenv + echo '\n' >> ~/.zshenv echo "==> Node Version Manager installed." diff --git a/zsh.sh b/zsh.sh index bf1087b..da9cdfc 100755 --- a/zsh.sh +++ b/zsh.sh @@ -18,7 +18,7 @@ if command -v "brew" > /dev/null 2>&1; then brew install zsh zsh-completions echo "==> Updated ZSH installed." - echo "export EDITOR=nano" >> ~/.zshenv + echo 'export EDITOR=nano' >> ~/.zshenv echo "\n" >> ~/.zshenv echo "==> Installing Oh My Zsh..." From f44317ab7f51f244572ac13263afd9f83f121a4a Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Mon, 17 Jun 2019 15:42:03 -0500 Subject: [PATCH 22/43] gui-applications: fix typo --- gui-applications.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui-applications.sh b/gui-applications.sh index 4c87bd0..13b149e 100755 --- a/gui-applications.sh +++ b/gui-applications.sh @@ -13,7 +13,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" if ! command -v "brew" > /dev/null 2>&1; then echo "==> Homebrew not found. Installing now..." - ${DIV}/brew.sh + ${DIR}/brew.sh fi if command -v "brew" > /dev/null 2>&1; then From 245c8d1ab606b9eabdc46eebfe9a0f5cb07cc17b Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Mon, 17 Jun 2019 20:24:48 -0500 Subject: [PATCH 23/43] Fix ${DIR} typos --- development-utils.sh | 16 ++++++++-------- gnu-utils.sh | 2 +- ionic-projects.sh | 2 +- ionic.sh | 2 +- java8.sh | 2 +- nodejs.sh | 2 +- zsh.sh | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/development-utils.sh b/development-utils.sh index 1daf42c..5f14f4c 100755 --- a/development-utils.sh +++ b/development-utils.sh @@ -36,7 +36,7 @@ if ! command -v "brew" > /dev/null 2>&1; then echo "==> Install Homebrew? (Y/n)" read USER_PROMPT if [[ "$USER_PROMPT" = 'y' ]] || [[ "$USER_PROMPT" = '' ]]; then - ${DIV}/brew.sh + ${DIR}/brew.sh else echo "==> Skip installing Homebrew." fi @@ -45,7 +45,7 @@ fi echo "==> Install updated GNU utilities? (Y/n)" read USER_PROMPT if [[ "$USER_PROMPT" = 'y' ]] || [[ "$USER_PROMPT" = '' ]]; then - ${DIV}/gnu-utils.sh + ${DIR}/gnu-utils.sh else echo "==> Skip installing updated GNU utilities." fi @@ -71,7 +71,7 @@ if ! command -v "node" > /dev/null 2>&1; then echo "==> Install Node.js? (Y/n)" read USER_PROMPT if [[ "$USER_PROMPT" = 'y' ]] || [[ "$USER_PROMPT" = '' ]]; then - ${DIV}/nodejs.sh + ${DIR}/nodejs.sh else echo "==> Skip installing Node.js." fi @@ -81,12 +81,12 @@ if ! command -v "ionic" > /dev/null 2>&1; then echo "==> Install Ionic? (Y/n)" read USER_PROMPT if [[ "$USER_PROMPT" = 'y' ]] || [[ "$USER_PROMPT" = '' ]]; then - ${DIV}/ionic.sh + ${DIR}/ionic.sh echo "==> Clone Ionic projects? (Y/n)" read USER_PROMPT if [[ "$USER_PROMPT" = 'y' ]] || [[ "$USER_PROMPT" = '' ]]; then - ${DIV}/ionic-projects.sh + ${DIR}/ionic-projects.sh else echo "==> Skip cloning Ionic projects." fi @@ -99,12 +99,12 @@ if ! command -v "ng" > /dev/null 2>&1; then echo "==> Install Angular? (Y/n)" read USER_PROMPT if [[ "$USER_PROMPT" = 'y' ]] || [[ "$USER_PROMPT" = '' ]]; then - ${DIV}/angular.sh + ${DIR}/angular.sh # echo "==> Clone Angular projects? (Y/n)" # read USER_PROMPT # if [[ "$USER_PROMPT" = 'y' ]] || [[ "$USER_PROMPT" = '' ]]; then - # ${DIV}/angular-projects.sh + # ${DIR}/angular-projects.sh # else # echo "==> Skip cloning Angular projects." # fi @@ -124,7 +124,7 @@ fi echo "==> Install Android development environment? (Y/n)" read USER_PROMPT if [[ "$USER_PROMPT" = 'y' ]] || [[ "$USER_PROMPT" = '' ]]; then - ${DIV}/android-development.sh + ${DIR}/android-development.sh else echo "==> Skip installing Android development environment." fi diff --git a/gnu-utils.sh b/gnu-utils.sh index dd7a853..482edaf 100755 --- a/gnu-utils.sh +++ b/gnu-utils.sh @@ -13,7 +13,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" if ! command -v "brew" > /dev/null 2>&1; then echo "==> Homebrew not found. Installing now..." - ${DIV}/brew.sh + ${DIR}/brew.sh fi if command -v "brew" > /dev/null 2>&1; then diff --git a/ionic-projects.sh b/ionic-projects.sh index 1879d97..7a226bb 100755 --- a/ionic-projects.sh +++ b/ionic-projects.sh @@ -13,7 +13,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" if ! command -v "brew" > /dev/null 2>&1; then echo "==> Homebrew not found. Installing now..." - ${DIV}/brew.sh + ${DIR}/brew.sh fi if command -v "brew" > /dev/null 2>&1; then diff --git a/ionic.sh b/ionic.sh index afc2dad..653a170 100755 --- a/ionic.sh +++ b/ionic.sh @@ -13,7 +13,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" if ! command -v "npm" > /dev/null 2>&1; then echo "==> NPM not installed. Installing Node.js now..." - ${DIV}/nodejs.sh + ${DIR}/nodejs.sh fi if command -v "npm" > /dev/null 2>&1; then diff --git a/java8.sh b/java8.sh index 8ea1e3c..d7c92eb 100755 --- a/java8.sh +++ b/java8.sh @@ -10,7 +10,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" if ! command -v "brew" > /dev/null 2>&1; then echo "==> Homebrew not found. Installing now..." - ${DIV}/brew.sh + ${DIR}/brew.sh fi if command -v "brew" > /dev/null 2>&1; then diff --git a/nodejs.sh b/nodejs.sh index 2340c3a..cb5dcc8 100755 --- a/nodejs.sh +++ b/nodejs.sh @@ -14,7 +14,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" if ! command -v "brew" > /dev/null 2>&1; then echo "==> Homebrew not found. Installing now..." - ${DIV}/brew.sh + ${DIR}/brew.sh fi if command -v "brew" > /dev/null 2>&1; then diff --git a/zsh.sh b/zsh.sh index da9cdfc..d2cc550 100755 --- a/zsh.sh +++ b/zsh.sh @@ -10,7 +10,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" if ! command -v "brew" > /dev/null 2>&1; then echo "==> Homebrew not found. Installing now..." - ${DIV}/brew.sh + ${DIR}/brew.sh fi if command -v "brew" > /dev/null 2>&1; then From b2adde5d93be221d62791db4c233ad833acfae92 Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Tue, 18 Jun 2019 11:05:24 -0500 Subject: [PATCH 24/43] oh-my-zsh-plugins: fix `~/.zshrc` check --- oh-my-zsh-plugins.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/oh-my-zsh-plugins.sh b/oh-my-zsh-plugins.sh index 47d1c7f..c0dfbed 100755 --- a/oh-my-zsh-plugins.sh +++ b/oh-my-zsh-plugins.sh @@ -8,8 +8,10 @@ set -e # Store a local variable of the scripts current directory DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -if [[ -f "~/.zshrc" ]]; then +if [[ ! -f "~/.zshrc" ]]; then + echo "==> Configuring Oh My Zsh plugins..." sed -i -e 's/plugins=(git)/plugins=(git mvn nvm z)/g' ~/.zshrc + echo "==> Oh My Zsh plugins configured." else echo "==> .zshrc not found, Oh My Zsh possibly not installed. Aborting." exit 1 From d72233037fb7ac3217ec67cbed23680e1a509153 Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Tue, 18 Jun 2019 11:06:00 -0500 Subject: [PATCH 25/43] bootstrap: add ending echo --- bootstrap.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bootstrap.sh b/bootstrap.sh index b230c0f..f789697 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -45,3 +45,5 @@ if [[ "$USER_PROMPT" == 'y' ]] || [[ "$USER_PROMPT" == '' ]]; then else echo "==> Skip installing development utilities." fi + +echo "==> Bootstrap complete." From f8fc657cf207e6740ba9c8315f4423bcc351449f Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Tue, 18 Jun 2019 11:06:30 -0500 Subject: [PATCH 26/43] java8: change tap to avoid conflicts --- java8.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java8.sh b/java8.sh index d7c92eb..3386994 100755 --- a/java8.sh +++ b/java8.sh @@ -15,7 +15,7 @@ fi if command -v "brew" > /dev/null 2>&1; then echo "==> Tapping OpenJDK..." - brew tap adoptopenjdk/openjdk + brew tap homebrew/cask-versions echo "==> OpenJDK tapped." echo "==> Installing OpenJDK 8..." From d0d759dac5ff55e445edccc27934a8e7743583d0 Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Fri, 12 Jul 2019 07:18:05 -0500 Subject: [PATCH 27/43] gnu-utils: remove `--with-default-names` This flag is no longer supported. --- gnu-utils.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu-utils.sh b/gnu-utils.sh index 482edaf..c9797d5 100755 --- a/gnu-utils.sh +++ b/gnu-utils.sh @@ -23,8 +23,8 @@ if command -v "brew" > /dev/null 2>&1; then brew install bash # Install GNU versions of command line utils - brew install grep --with-default-names - brew install gnu-sed --with-default-names + brew install grep + brew install gnu-sed brew install moreutils echo "==> Updated GNU utilities installed." From 092b472c8d82049f081114c13de9161b857466d4 Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Fri, 30 Aug 2019 08:13:59 -0500 Subject: [PATCH 28/43] development-utils: install Hyper terminal --- development-utils.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/development-utils.sh b/development-utils.sh index 5f14f4c..b145f5a 100755 --- a/development-utils.sh +++ b/development-utils.sh @@ -59,6 +59,7 @@ if [[ "$USER_PROMPT" = 'y' ]] || [[ "$USER_PROMPT" = '' ]]; then brew cask install \ docker \ gitkraken \ + hyper \ intellij-idea \ iterm2 \ postman \ From b8832df6c26fd5a3b46b113c9716bdf11262c7c0 Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Wed, 8 Apr 2020 18:28:04 -0500 Subject: [PATCH 29/43] macos-tweaks: allow apps downloaded from "anywhere" --- macos-tweaks.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/macos-tweaks.sh b/macos-tweaks.sh index cecd6bd..6226d3f 100755 --- a/macos-tweaks.sh +++ b/macos-tweaks.sh @@ -37,6 +37,12 @@ sudo systemsetup -setcomputersleep 60 # Disable Notification Center and remove the menu bar icon #launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist 2> /dev/null +############################################################################### +# General # +############################################################################### +# Allow apps downloaded from "anywhere" +sudo spctl --master-disable + ############################################################################### # Input # ############################################################################### From ea4a285f1344cd3b025f48f840c9ef001bf74044 Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Tue, 21 Apr 2020 20:38:15 -0500 Subject: [PATCH 30/43] bootstrap: don't install macOS updates Probably not safe on a Hackintosh. --- bootstrap.sh | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index f789697..eee613a 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -11,17 +11,6 @@ sudo -v # Store a local variable of the scripts current directory DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -echo "==> Install macOS updates? (Y/n)" -read USER_PROMPT -if [[ "$USER_PROMPT" == 'y' ]] || [[ "$USER_PROMPT" == '' ]]; then - echo "==> Updating macOS..." - softwareupdate -l - softwareupdate -i -a - echo "==> macOS updated installed." -else - echo "==> Skip installing macOS updates." -fi - echo "==> Install macOS tweaks? (Y/n)" read USER_PROMPT if [[ "$USER_PROMPT" == 'y' ]] || [[ "$USER_PROMPT" == '' ]]; then From f7e2c1f5c30080c3ecf0bd22c2222885b951f566 Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Tue, 21 Apr 2020 20:39:57 -0500 Subject: [PATCH 31/43] macos-tweaks: show seconds in menu bar --- macos-tweaks.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/macos-tweaks.sh b/macos-tweaks.sh index 6226d3f..8c62673 100755 --- a/macos-tweaks.sh +++ b/macos-tweaks.sh @@ -82,6 +82,12 @@ defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false # Automatically hide and show the Dock defaults write com.apple.dock autohide -bool true +############################################################################### +# Dock # +############################################################################### +# Show seconds in menu bar +defaults write com.apple.menuextra.clock DateFormat -string "EEE h:mm:ss a" + ############################################################################### # Messages # ############################################################################### @@ -99,7 +105,8 @@ defaults write com.apple.messageshelper.MessageController SOInputLineSettings -d ############################################################################### for app in "Dock" \ "Finder" \ - "Messages"; do + "Messages" \ + "SystemUIServer"; do killall "${app}" &> /dev/null done From ac7d338d19dacad083669c4d8ffe66e7948410ad Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Tue, 21 Apr 2020 20:40:51 -0500 Subject: [PATCH 32/43] gui-applications: install Pocket Casts --- gui-applications.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/gui-applications.sh b/gui-applications.sh index 13b149e..b5742ef 100755 --- a/gui-applications.sh +++ b/gui-applications.sh @@ -29,6 +29,7 @@ if command -v "brew" > /dev/null 2>&1; then google-chrome \ keka \ plex-media-server \ + pocket-casts \ slack \ spotify \ telegram-desktop \ From 89141d475c8e3118debeec0eadb89e23087eb1bc Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Tue, 21 Apr 2020 20:41:19 -0500 Subject: [PATCH 33/43] gui-applications: whitspace --- gui-applications.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gui-applications.sh b/gui-applications.sh index b5742ef..b7f6537 100755 --- a/gui-applications.sh +++ b/gui-applications.sh @@ -33,7 +33,8 @@ if command -v "brew" > /dev/null 2>&1; then slack \ spotify \ telegram-desktop \ - transmission vlc \ + transmission \ + vlc \ echo "==> User applications installed." else From 8a9cfe76e0b11dd7d4398c6dcc6bd3d28494a13d Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Tue, 21 Apr 2020 20:41:52 -0500 Subject: [PATCH 34/43] gui-applications: remove a few applications --- gui-applications.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/gui-applications.sh b/gui-applications.sh index b7f6537..3f2a657 100755 --- a/gui-applications.sh +++ b/gui-applications.sh @@ -22,11 +22,7 @@ if command -v "brew" > /dev/null 2>&1; then brew cask install \ alfred \ android-file-transfer \ - caffeine \ - clover-configurator \ - eqmac \ firefox \ - google-chrome \ keka \ plex-media-server \ pocket-casts \ From 01a722683983a1b43b59077c98d6a175fcf07b33 Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Tue, 21 Apr 2020 20:50:18 -0500 Subject: [PATCH 35/43] development-utils: don't prompt to install Ionic or Angular --- development-utils.sh | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/development-utils.sh b/development-utils.sh index b145f5a..7fcdb4e 100755 --- a/development-utils.sh +++ b/development-utils.sh @@ -78,42 +78,6 @@ if ! command -v "node" > /dev/null 2>&1; then fi fi -if ! command -v "ionic" > /dev/null 2>&1; then - echo "==> Install Ionic? (Y/n)" - read USER_PROMPT - if [[ "$USER_PROMPT" = 'y' ]] || [[ "$USER_PROMPT" = '' ]]; then - ${DIR}/ionic.sh - - echo "==> Clone Ionic projects? (Y/n)" - read USER_PROMPT - if [[ "$USER_PROMPT" = 'y' ]] || [[ "$USER_PROMPT" = '' ]]; then - ${DIR}/ionic-projects.sh - else - echo "==> Skip cloning Ionic projects." - fi - else - echo "==> Skip installing Ionic CLI." - fi -fi - -if ! command -v "ng" > /dev/null 2>&1; then - echo "==> Install Angular? (Y/n)" - read USER_PROMPT - if [[ "$USER_PROMPT" = 'y' ]] || [[ "$USER_PROMPT" = '' ]]; then - ${DIR}/angular.sh - - # echo "==> Clone Angular projects? (Y/n)" - # read USER_PROMPT - # if [[ "$USER_PROMPT" = 'y' ]] || [[ "$USER_PROMPT" = '' ]]; then - # ${DIR}/angular-projects.sh - # else - # echo "==> Skip cloning Angular projects." - # fi - else - echo "==> Skip installing Angular CLI." - fi -fi - echo "==> Install Java 8? (Y/n)" read USER_PROMPT if [[ "$USER_PROMPT" = 'y' ]] || [[ "$USER_PROMPT" = 'yes' ]] || [[ "$USER_PROMPT" = '' ]]; then From 80a15837d99d765ba8b1fa5885aed95dc4cea79f Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Tue, 21 Apr 2020 20:51:47 -0500 Subject: [PATCH 36/43] Remove some scripts --- angular.sh | 23 ------------------- ionic-projects.sh | 57 ----------------------------------------------- ionic.sh | 26 --------------------- 3 files changed, 106 deletions(-) delete mode 100755 angular.sh delete mode 100755 ionic-projects.sh delete mode 100755 ionic.sh diff --git a/angular.sh b/angular.sh deleted file mode 100755 index b43517c..0000000 --- a/angular.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -# Install Angular - -# Exit immediately if a command exits with a non-zero status -set -e - -# Store a local variable of the scripts current directory -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -if ! command -v "npm" > /dev/null 2>&1; then - echo "==> NPM not installed. Installing Node.js now..." - ${DIR}/nodejs.sh -fi - -if command -v "npm" > /dev/null 2>&1; then - echo "==> Installing Angular CLI..." - npm install -g @angular/cli - echo "==> Angular CLI installed." -else - echo "==> NPM not installed. Aborting..." - exit 1 -fi diff --git a/ionic-projects.sh b/ionic-projects.sh deleted file mode 100755 index 7a226bb..0000000 --- a/ionic-projects.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh - -# Clone Ionic Projects - -# Exit immediately if a command exits with a non-zero status -set -e - -# Update the user's cached credentials, authenticating the user if necessary -sudo -v - -# Store a local variable of the scripts current directory -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -if ! command -v "brew" > /dev/null 2>&1; then - echo "==> Homebrew not found. Installing now..." - ${DIR}/brew.sh -fi - -if command -v "brew" > /dev/null 2>&1; then - echo "==> Installing CouchDB..." - brew install couchdb - brew services start couchdb - echo "==> CouchDB installed." - - echo "==> Adding CORS to CouchDB..." - npm install -g add-cors-to-couchdb - add-cors-to-couchdb - echo "==> CORS added to CouchDB." - - if ! command -v "git" > /dev/null 2>&1; then - echo "==> Installing Git..." - brew install git - echo "==> Git installed." - fi - - if command -v "git" > /dev/null 2>&1; then - echo "==> Cloning Ionic projects..." - - # Create Source Code Directory - mkdir -p ~/code/ionic - cd ~/code/ionic - - # Clone Ionic Projects - git clone https://github.com/dshoe/taskit-ionic.git - git clone https://github.com/dshoe/CryptoProfitLog.git - git clone https://github.com/dshoe/DaysSince.git - git clone https://github.com/dshoe/WaterWatch.git - - echo "==> Ionic projects cloned." - else - echo "==> Git not found. Aborting..." - exit 1 - fi -else - echo "==> Homebrew not found. Aborting..." - exit 1 -fi diff --git a/ionic.sh b/ionic.sh deleted file mode 100755 index 653a170..0000000 --- a/ionic.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -# Install Ionic - -# Exit immediately if a command exits with a non-zero status -set -e - -# Update the user's cached credentials, authenticating the user if necessary -sudo -v - -# Store a local variable of the scripts current directory -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -if ! command -v "npm" > /dev/null 2>&1; then - echo "==> NPM not installed. Installing Node.js now..." - ${DIR}/nodejs.sh -fi - -if command -v "npm" > /dev/null 2>&1; then - echo "==> Installing Ionic CLI..." - npm install -g ionic - echo "==> Ionic CLI installed." -else - echo "==> NPM not installed. Aborting..." - exit 1 -fi From f7ed60c4324b4b11872a8e7c9356021cba631818 Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Tue, 21 Apr 2020 20:51:59 -0500 Subject: [PATCH 37/43] development-utils: don't install Java --- development-utils.sh | 8 -------- 1 file changed, 8 deletions(-) diff --git a/development-utils.sh b/development-utils.sh index 7fcdb4e..335476d 100755 --- a/development-utils.sh +++ b/development-utils.sh @@ -78,14 +78,6 @@ if ! command -v "node" > /dev/null 2>&1; then fi fi -echo "==> Install Java 8? (Y/n)" -read USER_PROMPT -if [[ "$USER_PROMPT" = 'y' ]] || [[ "$USER_PROMPT" = 'yes' ]] || [[ "$USER_PROMPT" = '' ]]; then - ${DIR}/java8.sh -else - echo "==> Skip installing Java 8." -fi - echo "==> Install Android development environment? (Y/n)" read USER_PROMPT if [[ "$USER_PROMPT" = 'y' ]] || [[ "$USER_PROMPT" = '' ]]; then From ca99f24c6c34c4ef8036ee8ddb5baa796d20fe5f Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Thu, 23 Apr 2020 22:18:23 -0500 Subject: [PATCH 38/43] gui-applications: add Hyper back --- gui-applications.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/gui-applications.sh b/gui-applications.sh index 3f2a657..da2df7a 100755 --- a/gui-applications.sh +++ b/gui-applications.sh @@ -23,6 +23,7 @@ if command -v "brew" > /dev/null 2>&1; then alfred \ android-file-transfer \ firefox \ + hyper \ keka \ plex-media-server \ pocket-casts \ From 05074c5c509cc578a67e2938b976cb4784d2a733 Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Thu, 23 Apr 2020 22:22:41 -0500 Subject: [PATCH 39/43] macos-tweaks: comment out computer sleep settings by default --- macos-tweaks.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macos-tweaks.sh b/macos-tweaks.sh index 8c62673..d4bac2e 100755 --- a/macos-tweaks.sh +++ b/macos-tweaks.sh @@ -32,7 +32,7 @@ defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false # defaults write NSGlobalDomain AppleInterfaceStyle Dark # Enter sleep mode after 60 minutes -sudo systemsetup -setcomputersleep 60 +# sudo systemsetup -setcomputersleep 60 # Disable Notification Center and remove the menu bar icon #launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist 2> /dev/null From ae011a461af528a48fcc5c22a0ad064a84e716c3 Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Sat, 25 Apr 2020 18:47:42 -0500 Subject: [PATCH 40/43] nodejs: install NVM with official script to fix zsh plugin --- nodejs.sh | 53 ++++++++++++++++------------------------------------- 1 file changed, 16 insertions(+), 37 deletions(-) diff --git a/nodejs.sh b/nodejs.sh index cb5dcc8..cccd603 100755 --- a/nodejs.sh +++ b/nodejs.sh @@ -12,40 +12,19 @@ sudo -v # Store a local variable of the scripts current directory DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -if ! command -v "brew" > /dev/null 2>&1; then - echo "==> Homebrew not found. Installing now..." - ${DIR}/brew.sh -fi - -if command -v "brew" > /dev/null 2>&1; then - echo "==> Installing Node Version Manager..." - - # Install Node Version Manager - brew install nvm - - # Allow NVM without restarting - export NVM_DIR="$HOME/.nvm" - [ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm - [ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion" # This loads nvm bash_completion - - # Allow NVM after restarting - echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.bash_profile - echo '[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh"' >> ~/.bash_profile - echo '[ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion"' >> ~/.bash_profile - echo '\n' >> ~/.bash_profile - - echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.zshenv - echo '[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh"' >> ~/.zshenv - echo '[ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion"' >> ~/.zshenv - echo '\n' >> ~/.zshenv - - echo "==> Node Version Manager installed." - - # Install latest Node.js with NVM - echo "==> Installing latest Node.js LTS..." - nvm install --lts - echo "==> Latest Node.js LTS installed." -else - echo "==> Homebrew not found. Aborting..." - exit 1 -fi +echo "==> Installing Node Version Manager..." + +# Install Node Version Manager +curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash + +# Allow NVM without restarting +export NVM_DIR="$HOME/.nvm" +[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm +[ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion" # This loads nvm bash_completion + +echo "==> Node Version Manager installed." + +# Install latest Node.js with NVM +echo "==> Installing latest Node.js LTS..." +nvm install --lts +echo "==> Latest Node.js LTS installed." From 96c0c16385c39e8b7714ce3b17dfa14bc7c27a83 Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Fri, 20 Nov 2020 08:56:03 -0800 Subject: [PATCH 41/43] brew: update install script --- brew.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brew.sh b/brew.sh index 972678a..5539df4 100755 --- a/brew.sh +++ b/brew.sh @@ -6,5 +6,5 @@ set -e echo "==> Installing Homebrew..." -/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" echo "==> Homebrew installed." From 1458100c7708c91fc397a50f2509e5d601452bd5 Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Fri, 20 Nov 2020 09:12:19 -0800 Subject: [PATCH 42/43] nodejs: update nvm --- nodejs.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nodejs.sh b/nodejs.sh index cccd603..9c326e4 100755 --- a/nodejs.sh +++ b/nodejs.sh @@ -15,12 +15,11 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" echo "==> Installing Node Version Manager..." # Install Node Version Manager -curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash +curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.0/install.sh | bash # Allow NVM without restarting export NVM_DIR="$HOME/.nvm" -[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm -[ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion" # This loads nvm bash_completion +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm echo "==> Node Version Manager installed." From dab798ad5a6ce14a6cb2c49639764613c6b4e580 Mon Sep 17 00:00:00 2001 From: Devin Shoemaker Date: Fri, 20 Nov 2020 09:20:19 -0800 Subject: [PATCH 43/43] zsh: update oh my zsh --- zsh.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zsh.sh b/zsh.sh index d2cc550..c065dca 100755 --- a/zsh.sh +++ b/zsh.sh @@ -22,5 +22,5 @@ if command -v "brew" > /dev/null 2>&1; then echo "\n" >> ~/.zshenv echo "==> Installing Oh My Zsh..." - sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" + sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" fi