Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)"
```
53 changes: 31 additions & 22 deletions osx_setup/dev_setup
Original file line number Diff line number Diff line change
@@ -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!"
2 changes: 1 addition & 1 deletion osx_setup/github-keygen
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down