Last active
December 11, 2023 15:16
-
-
Save KZeronimo/8816ca472c3745a95ad35386ae2da5e5 to your computer and use it in GitHub Desktop.
Brew based Boxstarter Script - Bootstrap - OS X
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
IFS=$'\n\t' | |
function finish { | |
rm -rf "$targetPath/PostBuildContent-master" | |
rm "$HOME/PostBuildContent.zip" | |
} | |
trap finish EXIT | |
if ! [[ $(command -v brew) ]]; then | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
fi | |
if ! grep -wiq 'eval "\$(/opt/homebrew/bin/brew shellenv)"' "$HOME/.zprofile"; then | |
echo 'Adding brew to .zprofile' | |
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> "$HOME/.zprofile"; | |
eval "$(/opt/homebrew/bin/brew shellenv)" | |
fi | |
# Get Post Build Content | |
echo "Getting post build content" | |
targetPath="$HOME/_PostBuildContent" | |
if [ -d "$targetPath" ]; then | |
echo "Removing previous $targetPath" | |
rm -rf "$targetPath" | |
fi | |
curl -o "$HOME/PostBuildContent.zip" -L https://github.com/KZeronimo/PostBuildContent/archive/refs/heads/master.zip | |
unzip "$HOME/PostBuildContent.zip" -d "$targetPath" | |
mv "$targetPath/PostBuildContent-master/"* "$targetPath" | |
answersPath="/tmp/User_Answers.json" | |
if [ -f "$answersPath" ]; then | |
cp "$answersPath" "$targetPath/User_Answers.json" | |
fi | |
# Retrieve latest release URL | |
latest_url=$(curl -s https://api.github.com/repos/microsoft/cascadia-code/releases/latest | grep -m1 browser_download_url | awk -F '"' '{print $4}') | |
echo "Download URL: $latest_url" | |
brew tap homebrew/cask-fonts | |
brew install --cask \ | |
font-caskaydia-cove-nerd-font \ | |
font-sauce-code-pro-nerd-font | |
brew install \ | |
azure-cli \ | |
azure/functions/azure-functions-core-tools@4 \ | |
dapr/tap/dapr-cli \ | |
helm \ | |
jq \ | |
linkerd \ | |
powerlevel10k \ | |
shellcheck | |
brew install --cask \ | |
azure-data-studio \ | |
docker \ | |
google-chrome \ | |
iterm2 \ | |
microsoft-azure-storage-explorer \ | |
microsoft-edge \ | |
postman \ | |
visual-studio-code \ | |
wireshark |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment