Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jadsonbr/e315c8bb0d233d1a5172e360f234760b to your computer and use it in GitHub Desktop.
Save jadsonbr/e315c8bb0d233d1a5172e360f234760b to your computer and use it in GitHub Desktop.
Script to install all good tools on a fresh new macOS machine. Some command are commented out because the main reason for this file is to be used on my online course: https://udemy.com/angular-native
#!/bin/sh
# Allow locate commands
# sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist
# xcode command line - Select: "Get xcode" and go get a coffee (preferably far from your desk :)
xcode-select --install
# home-brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# vai pedir pra instalar o command line tools for macOS se o passo anterior não tiver sido executado
brew tap caskroom/cask
brew tap caskroom/versions
# zsh and iterm2
brew cask install iterm2
brew install zsh zsh-completions
echo 'fpath=(/usr/local/share/zsh-completions $fpath)' >> ~/.zshrc
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# Git
brew install git
echo "Define your Git username"
read username
git config --global user.name "$username"
echo "Define your Git email"
read email
git config --global user.email "$email"
# Java SDK
brew install jenv
brew cask install java java8
echo 'export PATH="$HOME/.jenv/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(jenv init -)"' >> ~/.zshrc
jenv add /Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Home
jenv add /Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/
jenv global 1.8
jenv local 1.8
jenv shell 1.8
# Browsers - optional
# brew cask install google-chrome
# brew cask install google-chrome-canary
# brew cask install firefox
# brew cask install safari-technology-preview
# Android
# https://github.com/Homebrew/brew/issues/2424 - brew install android-sdk não existe mais
# brew cask install android-sdk
brew cask install android-studio
echo "export ANDROID_HOME=$HOME/Library/android/sdk" >> ~/.zshrc
$ANDROID_HOME/tools/bin/sdkmanager "tools" "platform-tools" "platforms;android-25" "build-tools;25.0.2" "extras;android;m2repository" "extras;google;m2repository"
# NodeJS / NPM
brew install n
sudo mkdir /usr/local/n
sudo chown -R `whoami` /usr/local/n
n lts
n latest
# Visual Studio Code
brew cask install visual-studio-code
code --install-extension Telerik.nativescript
code --install-extension dbaeumer.vscode-eslint
code --install-extension eg2.tslint
code --install-extension johnpapa.Angular2
code --install-extension robertohuertasm.vscode-icons
code --install-extension wwwalkerrun.nativescript-ng2-snippets
code --install-extension xabikos.JavaScriptSnippets
code --install-extension Angular.ng-template
code --install-extension PeterJausovec.vscode-docker
code --install-extension eamodio.gitlens
code --install-extension esbenp.prettier-vscode
code --install-extension EditorConfig.editorconfig
code --install-extension Arjun.swagger-viewer
code --install-extension PeterJausovec.vscode-docker
# Xcodeproj and Cocoapods
brew install rbenv ruby-build
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.zshrc
source ~/.zshrc
rbenv install 2.4.2
rbenv global 2.4.2
sudo gem install xcodeproj
sudo gem install cocoapods
# VirtualBox and Genymotion
echo "Using macOS 'High' Sierra? [y/N]"
read macOS
case $macOS in
[Yy]* ) brew cask install virtualbox; echo "System Preferences > Security & Privacy > Allow software from Oracle America. Done?";read foo;curl -fsSL https://gist.githubusercontent.com/berardo/f8a9113706d27fddab6edf270f0a5bdd/raw/a26483c67c9cbbe7bc8c7a92edd6b1ede3eb2d15/kernel_extensions.sh | sh -s load; brew cask reinstall --force virtualbox; break;;
* ) brew cask install virtualbox;;
esac
brew cask install genymotion
# Angular CLI & Nativescript
npm i -g @angular/cli
npm i -g nativescript
# Extras
# brew cask install adobe-photoshop-cs6 spectacle slack skype spotify
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment