Created
January 31, 2025 02:07
-
-
Save pmarcus93/702d750b2bbd459eb07efc4e7b45268d to your computer and use it in GitHub Desktop.
pmarcus93's fresh MacOS installation post-install script
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 | |
echo "Installing Homebrew" | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
if [ $? -eq 0 ]; then | |
echo "Homebrew installed successfully." | |
else | |
echo "Homebrew installation failed. Exiting..." | |
exit 1 | |
fi | |
# Reload the shell configuration | |
source ~/.zshrc | |
# CMD apps to be installed with Brew | |
brew_packages=( | |
"awscli" | |
) | |
# GUI apps to be installed with Brew | |
brew_cask_packages=( | |
"warp" | |
"orbstack" | |
"raycast" | |
"zed" | |
"zen-browser" | |
"firefox" | |
"upscayl" | |
"aldente" | |
"slack" | |
"keka" | |
"localsend" | |
"ticktick" | |
"neohtop" | |
"jetbrains-toolbox" | |
) | |
# Install CMD packages | |
for package in "${brew_packages[@]}"; do | |
echo "Installing $package..." | |
brew install $package | |
if [ $? -eq 0 ]; then | |
echo "$package installed successfully." | |
else | |
echo "Failed to install $package." | |
fi | |
done | |
# Install GUI packages | |
for cask_package in "${brew_cask_packages[@]}"; do | |
echo "Installing $cask_package..." | |
brew install --cask $cask_package | |
if [ $? -eq 0 ]; then | |
echo "$cask_package installed successfully." | |
else | |
echo "Failed to install $cask_package." | |
fi | |
done | |
# Install NVM and add it's configs to the zsh config file | |
echo "Installing NVM..." | |
brew install nvm | |
if [ $? -eq 0 ]; then | |
echo "NVM installed successfully." | |
else | |
echo "NVM installation failed. Exiting..." | |
exit 1 | |
fi | |
echo "Adding NVM configuration to ~/.zshrc..." | |
cat <<EOT >> ~/.zshrc | |
# NVM Configuration | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "$HOMEBREW_PREFIX/opt/nvm/nvm.sh" ] && \. "$HOMEBREW_PREFIX/opt/nvm/nvm.sh" | |
[ -s "$HOMEBREW_PREFIX/opt/nvm/etc/bash_completion.d/nvm" ] && \. "$HOMEBREW_PREFIX/opt/nvm/etc/bash_completion.d/nvm" | |
EOT | |
# Reload the shell configuration | |
source ~/.zshrc | |
echo "All good!" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment