Setting up a New Mac
Whenever I was setting up a new Mac once in a while, I found some of my old approaches were not ideal and wanted to find a “best” solution for the future. Although it’s kind of proven impossible, I’d like to take a note of the things I’ve done this time. It would be great to create a bunch of scripts so that I could start from a git repo, but I’m afraid the whole process is not optimized to the best so let’s just do things step by step. Here are the brief contents:
- Xcode & Dev Tools
- System Settings
Grab the latest
App Store, or download an old version and install manually by dragging
- Login to Apple Developer Center
- Find the version you want and download for free
xattr -d com.apple.quarantine /Applications/Xcode.appif it’s being verified all the time
Command Line Tools
OS X command-line tools contain the most basic dev components including
make, etc. and is required by
xcode-select --installor download and install a previous version manually
Although Dropbox can be accquired via
brew cask install dropbox, we still need to download and install it manually since that will be our startup point, which can be either Dropbox or a private git repo (public repo is not recommended since there might be some sort of credentials inside one of your preference files). I chose Dropbox because it provides a consistant user experience for file sharing, and conflict resolving is not really a big concern in this scenario.
Unfortunately OS X system preference cannot be imported/exported easily because they are saved in various different places. So while Dropbox is syncing your files, take a time to go through all the system settings to make yourself happy.
Shell is essential for developers like me. A nice shell environment generally means happy life.
Brew is a source based package/dependency management system on OS X. It’s not as fast to install as the binary based ones in most Linux distributions, but it’s the best of its kind in OS X. It’s mainly (but not only) for command-line tools, while
Cask is based on it and is used for native OS X apps.
- Generate brewfile and castfile from your old Mac
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew bundle brew/Brewfile(deprecated)
brew bundle brew/Caskfile(deprecated)
A nicer and faster shell. Oh-my-zsh cannot be installed via brew since it exists as a repo with plugins and themes together, other than an app with bin/lib and man pages. So just run the official install script.
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
ln -s Dropbox/etc/sh/.zshrc .zshrc
ln -s Dropbox/etc/sh/.gemrc .gemrc
ln -s Dropbox/etc/sh/.xvimrc .xvimrc
ln -s Dropbox/etc/sh/.bash_profile .bash_profile
cd .oh-my-zsh && git pull superarts master
vim instead to enable features like clipboard sharing.
sudo mv /usr/bin/vim /usr/bin/oldvim
ln -s Dropbox/etc/vim/.vimrc .vimrc
ln -s Dropbox/etc/vim/.vim .vim
- Install some “special” apps from
Advanced Settings-> uncheck
Enable automatic update checking
Tags: Mac OS X git brew homebrew