Created
November 14, 2024 15:17
-
-
Save w0rldart/4e01675cd233a0be6cb1dc1eee515a79 to your computer and use it in GitHub Desktop.
MacOs
This file contains hidden or 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 | |
################# | |
### VARIABLES ### | |
################# | |
NODE_VERSION="v18" | |
NPM_PACKAGES="yarn gulp standard" | |
BREW_ESSENTIALS="zsh zsh-autosuggestions zsh-syntax-highlighting vlc firefox brave-browser virtualbox virtualbox-extension-pack jq tmux nmap git pyenv" | |
BREW_DEV_TOOLS="tfenv vagrant packer ansible docker vagrant-manager rbenv ruby-build terraform-docs graphviz jq ffmpeg" | |
BREW_CSP_CLI="azure-cli doctl" | |
ALL_PACKAGES="${BREW_ESSENTIALS} ${BREW_DEV_TOOLS} ${BREW_CSP_CLI}" | |
BREW_CASKS="keepassxc lunar powershell" | |
################## | |
### INSTALLERS ### | |
################## | |
# Command Line Tools (CLT) for Xcode | |
xcode-select --install | |
# Homebrew | |
if ! command -v brew &> /dev/null | |
then | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" | |
fi | |
brew update && brew upgrade && brew upgrade --cask | |
echo; echo; echo " !! Installing the following brew packages: $ALL_PACKAGES" | |
brew install $ALL_PACKAGES --force | |
brew install --cask $BREW_CASKS --force | |
brew tap azure/functions | |
brew install azure-functions-core-tools@4 | |
brew install mysql-client | |
brew link mysql-client --force | |
# Firefox profile switcher extension | |
brew tap null-dev/firefox-profile-switcher | |
brew install firefox-profile-switcher-connector | |
sudo mkdir -p "/Library/Application Support/Mozilla/NativeMessagingHosts" | |
sudo ln -sf "$(brew ls -l firefox-profile-switcher-connector | grep -i ax.nd.profile_switcher_ff.json | head -n1)" "/Library/Application Support/Mozilla/NativeMessagingHosts"/ax.nd.profile_switcher_ff.json | |
# ZSH | |
sudo chown -R $(whoami) /usr/local/share/zsh /usr/local/share/zsh/site-functions | |
# Oh my ZSH & Spaceship Prompt | |
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | |
git clone https://github.com/spaceship-prompt/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt" --depth=1 | |
ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme" | |
echo "ZSH_THEME=\"spaceship"\" >> ~/.zshrc | |
echo "source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh" >> ~/.zshrc | |
# AWS CLI | |
if ! command -v aws &> /dev/null | |
then | |
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg" | |
sudo installer -pkg AWSCLIV2.pkg -target / | |
fi | |
# NVM | |
if ! command -v brew &> /dev/null | |
then | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
cat <<EOF >> ~/.zshrc | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
EOF | |
fi | |
if ! command -v node &> /dev/null | |
then | |
echo; echo; echo " !! Installing Node ${NODE_VERSION}" | |
nvm install $NODE_VERSION | |
fi | |
echo; echo; echo " !! Installing the following npm packages: ${NPM_PACKAGES}" | |
npm install -g $NPM_PACKAGES | |
# Setup directories | |
mkdir -p {~/Tools,~/Code} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment