Forked from berardo/angular-nativescript-course-setup.sh
Created
October 25, 2018 14:01
-
-
Save leonardopaiva/46e73c97c5917929f6a00b45a0d446cc 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
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/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)" | |
# will ask to install the command line tools for macOS if the previous step was not executed | |
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 | |
echo "export JAVA_HOME=\"$HOME/.jenv/versions/`jenv version-name`\"" >> ~/.zshrc | |
# 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