Software Setup Instructions
- Create a file called
initial-setup.sh
and copy the contents of the script below into it.
- to make it executable open the terminal and navigate to the directory where the file is located and run
chmod +x initial-setup.sh
- in the terminal, while still in the directory run the script with
./initial-setup.sh
.
# Install Homebrew
which brew || /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Check if it's arm processor (Mac M1 or higher)
if [[ $(uname -p) == 'arm' ]]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
# Attempt to get env vars new data (if changed)
source ~/.zshrc || true
source ~/.zprofile || true
# Check if Homebrew installed and make sure it's callable for next steps
if ! brew -v ; then
echo "Problem finding brew. Please restart your terminal and try again"
exit 2
fi
# Install packages
brew install zsh git hub gpg fzf node corepack stripe/stripe-cli/stripe awscli edgedb/tap/edgedb-cli
# Enable yarn via corepack
corepack enable
# Create AWS config file as AWS nodejs lib requires it when AWS_SDK_LOAD_CONFIG=true
aws configure set region us-east-2
# Change default shell to homebrew zsh
sudo chmod u+w /etc/shells
sudo bash -c "echo $(brew --prefix)/bin/zsh >> /etc/shells"
# Install ohmyzsh & set plugins
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
sed -i'' -e 's/^plugins=\(.*\)/plugins=(git docker github brew direnv docker-compose yarn fzf zsh-interactive-cd)/' ~/.zshrc
# Necessary global env vars
cat <<EOT >> ~/.zshrc
export NODE_NO_WARNINGS=1 # optional
export AWS_SDK_LOAD_CONFIG=true
export NODE_ENV=development
EOT
# Good dev apps
for app in authy rectangle gitify sf docker; do brew install --cask $app; done