Last active
February 14, 2021 18:36
-
-
Save dually8/6b7da37d6cb178ab07414c375824cd12 to your computer and use it in GitHub Desktop.
Dev My Mac pls
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 | |
# Updated 2020-03-20 | |
# Fork of this https://github.com/adamisntdead/DevMyMac | |
# Color Variables | |
RED='\033[0;31m' | |
GREEN='\033[0;32m' | |
NC='\033[0m' # No Color | |
# Ask for the administrator password upfront. | |
sudo -v | |
# Keep Sudo Until Script is finished | |
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & | |
# Check if OSX Command line tools are installed | |
if type xcode-select >&- && xpath=$( xcode-select --print-path ) && | |
test -d "${xpath}" && test -x "${xpath}" ; then | |
############################################################################### | |
# Computer Settings # | |
############################################################################### | |
# echo -e "${RED}Enter your computer name please?${NC}" | |
# read cpname | |
#sudo scutil --set ComputerName "$cpname" | |
#sudo scutil --set HostName "$cpname" | |
#sudo scutil --set LocalHostName "$cpname" | |
#defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "$cpname" | |
echo -e "${RED}Configure git user and email? ${NC}[y/N]" | |
read -n 1 -r | |
echo # (optional) move to a new line | |
if [[ $REPLY =~ ^[Yy]$ ]] | |
then | |
echo -e "${RED}Please enter your name?${NC}" | |
read name | |
echo -e "${RED}Please enter your git email?${NC}" | |
read email | |
git config --global user.name "$name" | |
git config --global user.email "$email" | |
git config --global color.ui true | |
fi | |
clear | |
defaults write -g ApplePressAndHoldEnabled -bool false | |
defaults write com.apple.finder ShowPathbar -bool true | |
defaults write com.apple.finder ShowStatusBar -bool true | |
defaults write NSGlobalDomain KeyRepeat -int 0.02 | |
# Enable Safari dev menu | |
defaults write NSGlobalDomain InitialKeyRepeat -int 12 | |
defaults write com.apple.Safari IncludeInternalDebugMenu -bool true && \ | |
defaults write com.apple.Safari IncludeDevelopMenu -bool true && \ | |
defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true && \ | |
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled -bool true && \ | |
defaults write -g WebKitDeveloperExtras -bool true | |
# Default text edit to txt instead of rtf | |
defaults write com.apple.TextEdit RichText -int 0 | |
# Show all file exts, files, and show path in title | |
defaults write -g AppleShowAllExtensions -bool true | |
defaults write com.apple.finder AppleShowAllFiles true | |
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true | |
# Show "Quit Finder" | |
defaults write com.apple.finder QuitMenuItem -bool true && \ | |
killall Finder | |
# Show pathbar | |
defaults write com.apple.finder ShowPathbar -bool true | |
# Show Status bar | |
defaults write com.apple.finder ShowStatusBar -bool true | |
# Default save docs to drive instead of iCloud | |
defaults write -g NSDocumentSaveNewDocumentsToCloud -bool false | |
# Disable mouse acceleration | |
defaults write .GlobalPreferences com.apple.mouse.scaling -1 | |
# Create and store screenshots to screenshots folder on desktop | |
defaults write com.apple.screencapture location ~/Desktop/Screenshots | |
killall SystemUIServer | |
chflags nohidden ~/Library | |
# Allow apps to run from anywhere | |
echo "Allowing apps from anywhere" | |
sudo spctl --master-disable | |
############################################################################### | |
# Install Applications # | |
############################################################################### | |
# Install Homebrew | |
echo "Installing Homebrew" | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" | |
clear | |
echo -e "${RED}Install NodeJS? ${NC}[y/N]" | |
read -n 1 -r | |
echo # (optional) move to a new line | |
if [[ $REPLY =~ ^[Yy]$ ]] | |
then | |
# Install Nodejs | |
echo "Installing n node version manager" | |
curl -L https://git.io/n-install | bash | |
#Installing Nodejs | |
echo "Installing latest Node LTS" | |
n lts | |
echo "Installing global node packages" | |
npm i -g npm | |
npm i -g @angular/cli | |
npm i -g @ionic/cli | |
npm i -g @openapitools/openapi-generator-cli | |
npm i -g bower | |
npm i -g common-readme | |
npm i -g cool-ascii-faces | |
npm i -g cordova | |
npm i -g cordova-check-plugins | |
npm i -g cordova-res | |
npm i -g cost-of-modules | |
npm i -g create-react-app | |
npm i -g csvtojson | |
npm i -g diff-so-fancy | |
npm i -g dockly | |
npm i -g eslint | |
npm i -g express-generator | |
npm i -g firebase-tools | |
npm i -g flow-bin | |
npm i -g generator-react-native-ignite | |
npm i -g git-recent | |
npm i -g git-stats | |
npm i -g git-stats-importer | |
npm i -g gulp | |
npm i -g hexo-cli | |
npm i -g ios-deploy --unsafe-perm=true | |
npm i -g ios-sim --unsafe-perm=true | |
npm i -g jasmine | |
npm i -g karma-cli | |
npm i -g markdown-spellcheck | |
npm i -g markdown-toc | |
npm i -g marked | |
npm i -g mocha | |
npm i -g native-run | |
npm i -g npm-check | |
npm i -g npm-check-updates | |
npm i -g npmrc | |
npm i -g pm2 | |
npm i -g protractor | |
npm i -g react-native-cli | |
npm i -g react-native-git-upgrade | |
npm i -g react-native-ignite | |
npm i -g tldr | |
npm i -g tslint | |
npm i -g typescript | |
npm i -g typescript-docs | |
npm i -g webpack | |
npm i -g webpack-dev-server | |
npm i -g write-good | |
npm i -g yo | |
fi | |
clear | |
echo -e "${RED}Install Unity3D? ${NC}[y/N]" | |
read -n 1 -r | |
echo # (optional) move to a new line | |
if [[ $REPLY =~ ^[Yy]$ ]] | |
then | |
brew cask install unity unity-web-player | |
fi | |
clear | |
echo -e "${RED}Install Python? ${NC}[y/N]" | |
read -n 1 -r | |
echo # (optional) move to a new line | |
if [[ $REPLY =~ ^[Yy]$ ]] | |
then | |
# Install Python | |
brew install python | |
# See https://docs.brew.sh/Homebrew-and-Python for more info | |
# To install python 2 or multiple versions of python, | |
# checkout https://github.com/pyenv/pyenv | |
fi | |
clear | |
echo -e "${RED}Install Ruby?${NC} [y/N]" | |
read -n 1 -r | |
echo # (optional) move to a new line | |
if [[ $REPLY =~ ^[Yy]$ ]] | |
then | |
# Install ruby | |
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-installer | bash | |
rbenv init | |
rbenv install 2.6.5 | |
gem install bundler | |
gem install rails | |
fi | |
clear | |
echo -e "${RED}Install Cocoapods?${NC} [y/N]" | |
read -n 1 -r | |
echo # (optional) move to a new line | |
if [[ $REPLY =~ ^[Yy]$ ]] | |
then | |
# Install Cocoapods | |
sudo gem install cocoapods | |
fi | |
clear | |
echo -e "${RED}Setup for Java Devlopment? ${NC}[y/N]" | |
read -n 1 -r | |
echo # (optional) move to a new line | |
if [[ $REPLY =~ ^[Yy]$ ]] | |
then | |
brew cask install \ | |
java \ | |
eclipse-ide \ | |
eclipse-java | |
fi | |
clear | |
echo -e "${RED}Setup For Android Developemnt?${NC} [y/N]" | |
read -n 1 -r | |
echo # (optional) move to a new line | |
if [[ $REPLY =~ ^[Yy]$ ]] | |
then | |
brew cask install \ | |
java \ | |
eclipse-ide \ | |
eclipse-java \ | |
android-studio \ | |
intellij-idea-ce | |
brew install android-sdk | |
fi | |
clear | |
echo -e "${RED}Install Databases? ${NC}[y/N]" | |
read -n 1 -r | |
echo # (optional) move to a new line | |
if [[ $REPLY =~ ^[Yy]$ ]] | |
then | |
brew install mysql | |
brew install postgresql | |
brew install mongo | |
brew install redis | |
brew install elasticsearch | |
# Install mysql workbench | |
# Install Cask | |
brew install caskroom/cask/brew-cask | |
brew cask install --appdir="/Applications" mysqlworkbench | |
fi | |
clear | |
echo -e "${RED}Install cool fonts? 😎 ${NC}[y/N]" | |
read -n 1 -r | |
echo | |
if [[ $REPLY =~ ^[Yy]$ ]] | |
then | |
brew cask install homebrew/cask-fonts/font-anonymouspro-nerd-font | |
brew cask install homebrew/cask-fonts/font-anonymouspro-nerd-font-mono | |
brew cask install homebrew/cask-fonts/font-cascadia-nerd-font | |
brew cask install homebrew/cask-fonts/font-cascadia-nerd-font-mono | |
brew cask install homebrew/cask-fonts/font-droidsansmono-nerd-font | |
brew cask install homebrew/cask-fonts/font-droidsansmono-nerd-font-mono | |
brew cask install homebrew/cask-fonts/font-firacode-nerd-font | |
brew cask install homebrew/cask-fonts/font-firacode-nerd-font-mono | |
brew cask install homebrew/cask-fonts/font-firamono-nerd-font | |
brew cask install homebrew/cask-fonts/font-firamono-nerd-font-mono | |
brew cask install homebrew/cask-fonts/font-hack-nerd-font | |
brew cask install homebrew/cask-fonts/font-hack-nerd-font-mono | |
brew cask install homebrew/cask-fonts/font-inconsolata-nerd-font | |
brew cask install homebrew/cask-fonts/font-inconsolata-nerd-font-mono | |
brew cask install homebrew/cask-fonts/font-iosevka-nerd-font | |
brew cask install homebrew/cask-fonts/font-iosevka-nerd-font-mono | |
brew cask install homebrew/cask-fonts/font-robotomono-nerd-font | |
brew cask install homebrew/cask-fonts/font-robotomono-nerd-font-mono | |
brew cask install homebrew/cask-fonts/font-sourcecodepro-nerd-font | |
brew cask install homebrew/cask-fonts/font-sourcecodepro-nerd-font-mono | |
brew cask install homebrew/cask-fonts/font-ubuntu-nerd-font | |
brew cask install homebrew/cask-fonts/font-ubuntu-nerd-font-mono | |
brew cask install homebrew/cask-fonts/font-ubuntumono-nerd-font | |
brew cask install homebrew/cask-fonts/font-ubuntumono-nerd-font-mono | |
fi | |
clear | |
echo -e "${RED}Install homebrew command line tools? ${NC}[y/N]" | |
read -n 1 -r | |
echo # (optional) move to a new line | |
if [[ $REPLY =~ ^[Yy]$ ]] | |
then | |
# Install Homebrew Apps | |
echo "Installing Homebrew Command Line Tools" | |
brew install \ | |
ack \ | |
annie \ | |
ant \ | |
automake \ | |
azure-cli \ | |
bash \ | |
bat \ | |
boost \ | |
carthage \ | |
ccat \ | |
cmake \ | |
cocoapods \ | |
coreutils \ | |
dtrx \ | |
elixir \ | |
emacs \ | |
exa \ | |
fd \ | |
ffmpeg \ | |
geckodriver \ | |
geoip \ | |
git-credential-manager \ | |
git-extras \ | |
git-flow \ | |
git-lfs \ | |
git-quick-stats \ | |
git-standup \ | |
gnupg \ | |
go \ | |
gobject-introspection \ | |
gradle \ | |
highlight \ | |
httpie \ | |
ideviceinstaller \ | |
interactive-rebase-tool \ | |
ios-webkit-debug-proxy \ | |
libav \ | |
lsd \ | |
lsusb \ | |
m-cli \ | |
maven \ | |
micro \ | |
mitmproxy \ | |
mkcert \ | |
mkdocs \ | |
mysql \ | |
nasm \ | |
neofetch \ | |
nss \ | |
postgresql \ | |
pwgen \ | |
rbenv \ | |
redis \ | |
ripgrep \ | |
rtv \ | |
rust \ | |
scriptcs \ | |
sphinx-doc \ | |
swagger-codegen@2 \ | |
texi2html \ | |
thefuck \ | |
tldr \ | |
tree \ | |
watchman \ | |
wget \ | |
wmctrl \ | |
yarn \ | |
yasm \ | |
you-get \ | |
youtube-dl | |
fi | |
# For satanists only | |
# echo "Installing EMacs" | |
# brew install emacs --with-cocoa | |
# brew linkapps emacs | |
clear | |
echo -e "${RED}Install mac apps? ${NC}[y/N]" | |
read -n 1 -r | |
echo # (optional) move to a new line | |
if [[ $REPLY =~ ^[Yy]$ ]] | |
then | |
brew tap caskroom/cask | |
echo "Installing Apps" | |
brew cask install \ | |
adobe-air \ | |
adoptopenjdk8 \ | |
appcleaner \ | |
atom \ | |
beardedspice \ | |
brave-browser \ | |
cakebrew \ | |
calibre \ | |
coderunner \ | |
db-browser-for-sqlite \ | |
dbeaver-community \ | |
dotnet-sdk \ | |
eclipse-ide \ | |
eclipse-java \ | |
firefox \ | |
firefox-developer-edition \ | |
flux \ | |
gifcapture \ | |
gitkraken \ | |
gitter \ | |
godot \ | |
handbrake \ | |
inkscape \ | |
insomnia \ | |
iterm2 \ | |
kap \ | |
kdiff3 \ | |
keepingyouawake \ | |
launchrocket \ | |
macdown \ | |
mamp \ | |
mojibar \ | |
mysqlworkbench \ | |
notable \ | |
obs \ | |
open-in-code \ | |
opensim \ | |
postman \ | |
scratch \ | |
sourcetree \ | |
sublime-text \ | |
virtualbox \ | |
visual-studio-code \ | |
vlc \ | |
wireshark \ | |
xquartz | |
fi | |
clear | |
echo -e "${RED}Install the good vim? ${NC}[y/N]" | |
read -n 1 -r | |
echo # (optional) move to a new line | |
if [[ $REPLY =~ ^[Yy]$ ]] | |
then | |
echo "Installing the good vim" | |
brew install macvim --HEAD --with-cscope --with-lua --with-override-system-vim --with-luajit --with-python | |
#echo "Getting the good vimrc and whatnot" | |
#curl http://j.mp/spf13-vim3 -L -o - | sh | |
fi | |
clear | |
echo -e "${RED}Install quicklook plugins? ${NC}[y/N]" | |
read -n 1 -r | |
echo # (optional) move to a new line | |
if [[ $REPLY =~ ^[Yy]$ ]] | |
then | |
echo "Installing quick look stuff" | |
brew cask install \ | |
ql-ansilove \ | |
qlcolorcode \ | |
qlcommonmark \ | |
qlimagesize \ | |
qlmarkdown \ | |
qlprettypatch \ | |
qlstephen \ | |
qlvideo \ | |
quicklook-csv \ | |
quicklook-json \ | |
quicklookase \ | |
webpquicklook | |
fi | |
clear | |
# echo "Cleaning Up Cask Files" | |
# brew cask cleanup | |
echo -e "${RED}Install zsh? ${NC}[y/N]" | |
read -n 1 -r | |
echo # (optional) move to a new line | |
if [[ $REPLY =~ ^[Yy]$ ]] | |
then | |
brew install zsh | |
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | |
fi | |
clear | |
echo -e "${RED}Install/make fish the default shell? ${NC}[y/N]" | |
read -n 1 -r | |
echo # (optional) move to a new line | |
if [[ $REPLY =~ ^[Yy]$ ]] | |
then | |
brew install fish | |
echo /usr/local/bin/fish | sudo tee -a /etc/shells | |
chsh -s /usr/local/bin/fish | |
fi | |
clear | |
echo -e "${RED}Did you install Ruby? ${NC}[y/N]" | |
read -n 1 -r | |
echo # (optional) move to a new line | |
if [[ $REPLY =~ ^[Yy]$ ]] | |
then | |
echo "Downloading and running rbenv-doctor..." | |
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash | |
fi | |
echo "${GREEN}Hope you didn't run into any issues! Thanks for using this!" | |
echo "${GREEN}If you had any issues, skim through the script and see if" | |
echo "${GREEN}you can run the problem lines one at a time." | |
else | |
echo "Need to install the OSX Command Line Tools (or XCode) First! Starting Install..." | |
# Install XCODE Command Line Tools | |
xcode-select --install | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
March 20, 2020 Update
Might swap this to an actual repository at some point. Hope it helps :)