diff --git a/README.md b/README.md index 8adf88e..e800270 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ # Dev computer set up -### Main OSX setup +## Main OSX setup -``` -/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/newsdaycom/dev/master/osx_setup/dev_setup)" +``` sh +/bin/zsh -c "$(curl -fsSL https://raw.githubusercontent.com/newsdaycom/dev/master/osx_setup/dev_setup)" ``` -### GitHub keys +## GitHub keys Generates and links your GitHub keys. Copy/paste the output from this into GitHub as your public key -``` +``` sh /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/newsdaycom/dev/master/osx_setup/github-keygen)" ``` diff --git a/osx_setup/dev_setup b/osx_setup/dev_setup index 6c4ed60..1c89451 100644 --- a/osx_setup/dev_setup +++ b/osx_setup/dev_setup @@ -1,38 +1,47 @@ -#!/bin/bash +#!/bin/zsh ## end setup on fail set -e +echo "Installing Oh My ZSH" +OVERWRITE_CONFIRMATION="no" +sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended +echo "Oh My ZSH installed" +clear + echo "Installing Homebrew" /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" if [[ "$(uname -m)" == "arm64" ]]; then echo "Arm64 detected, adding homebrew to path" - echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.profile + echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zshrc eval "$(/opt/homebrew/bin/brew shellenv)" - source ~/.profile + source ~/.zshrc fi - -clear - -echo "Installing awscli, nodejs, python, cask" -brew install --force awscli node@20 python cask -brew upgrade --force awscli node@20 python cask -echo 'export PATH=/usr/local/opt/node@20/bin:$PATH' >> ~/.zprofile -source ~/.zprofile - -clear -echo "Installing yarn" -sudo npm i -g yarn - -echo "Install mysqlworkbench, firefox, sublime text, cyberduck, vscode, docker" -brew install --cask --force mysqlworkbench firefox sublime-text postman cyberduck visual-studio-code docker +echo "Homebrew installed and PATH configured" +echo "Installing awscli, python" +brew install --force awscli python +# i don't know why TC put this upgrade line in, but i'll keep it here just in case +brew upgrade --force awscli python +echo "Installing mysqlworkbench, firefox, google-chrome, slack, studio-3t-community, postman, cyberduck, visual-studio-code, docker-desktop, zoom" +brew install --cask --force mysqlworkbench firefox google-chrome slack studio-3t-community postman cyberduck visual-studio-code docker-desktop zoom clear brew doctor -echo "Installing Oh My ZSH" -curl -L http://install.ohmyz.sh | sh clear - -echo "Install complete!" +# WE ARE USING NVM INSTEAD OF INSTALLING NODE THROUGH HOMEBREW BECAUSE +# 1. NODE GETS A NEW LTS VERSION EVERY YEAR +# 2. YOU DON'T HAVE TO COMPILE NODE FROM SOURCE WHEN YOUR MACOS VERSION IS UNSUPPORTED BY HOMEBREW +echo "Installing nvm" +bash -c 'curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash' +echo "nvm installed" +echo "Installing latest node.js LTS version and yarn" +echo "yarn" >> ~/.nvm/default-packages +nvm install --lts +echo "Node.js LTS and yarn are installed" + +echo "config npm to silence npm update notifier" +echo "update-notifier=false" >> ~/.npmrc +echo "npm configured" +echo "Install complete, restart your shell and/or system!" diff --git a/osx_setup/github-keygen b/osx_setup/github-keygen index 462add7..6a92227 100644 --- a/osx_setup/github-keygen +++ b/osx_setup/github-keygen @@ -8,7 +8,7 @@ CONFIG_FILE=$CONFIG_PATH/config mkdir -p $CONFIG_PATH -ssh-keygen -t rsa -f ~/.ssh/$KEY_NAME -q -P "" +ssh-keygen -t ed25519 -f ~/.ssh/$KEY_NAME -q -P "" echo "Host github.com User git