diff --git a/setup.sh b/setup.sh index 607be91..2461db1 100755 --- a/setup.sh +++ b/setup.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/zsh echo "Configuring macOS System Settings (you may be asked to enter password)" @@ -57,18 +57,31 @@ echo "- Avoid creating .DS_Store files on external volumes" defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true -# Install Homebrew -/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" +# Check if Xcode CLI Tools are installed, install them if not +if [[ $(xcode-select -p) == "" ]]; then + xcode-select --install +else + echo "Xcode CLI Tools are already installed" +fi # Set git to save any credentials in the macOS Keychain git config --global credential.helper osxkeychain +# Check if Homebrew is present, update if installed, run the install script if not +if [[ $(command -v brew) == "" ]]; then + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" +else + echo "Homebrew is already installed, running brew update" + brew update +fi + # Run Homebrew bundle with specified file brew bundle --file Brewfile # Run bash script to reconfigure Dock ./Dock.sh -# Applescript to open up Terminal using the downloaded theme +# Function to open up Terminal using the downloaded theme +setCustomTerminalTheme(){ cp Custom.terminal ~/Downloads/Custom.terminal osascript <