About this post
I have procrastinated for a while upgrading to Sierra. No moment was good enough to start the task.
The reason behind the lack of energy was quite simple: setting up my environment from scratch is painful so I decided to setup my own dotfiles, and document it in this post:
Don’t reinvent the wheel, don’t reinvent the wheel…
So, I decided to cherry-pick a few ideas from them and reinvent another wheel.
What is rcm
RCM stands for rc file management. It is a management suite for dotfiles.
Register existing rc files.
You can register existing rc-files with mkrc(1):
From now on those files are stored in $HOME/.dotfiles: they are symlinked from the $HOME folder.
Register new rc files
You can register new rcfiles using rcup(1).
This is what rcup did:
- Create a symlink in your home folder to the new file
- Add a dot prefix to the symlink
Adapt rcm to your own needs with rcrc
I have a two folders in $HOME/.dotfiles that I want to be copied without the `.` prefix. So I have updated the
rcrc file to ignore
An example: oh-my-zsh configuration
From now on, runing `rcup` will do the heavylifting.
Homebrew-bundle for packages
As other Mac users I have chosen Homebrew as my package manager, so I was very happy to find out that I can automate the installation of packages and apps using a master file. Something similar to Gemfiles for Rails apps:
Really easy and portable!
Homebrew-bundle for MacOS apps
Interestingly the same approach works for MacOS Apps
There are a few things that are important to me in order to have a seamless transition after a reinstalling everything from scratch:
- My Zsh history
- My Rubymine configuration
So, I have created scripts to back up those documents. I have chosen a simple approach: copy them into an iCloud folder.
One command to rule them all
Finally, I have created a command that runs everything:
- Update dotfiles following rcm rules
- Update/install packages and apps described in the Brewfile
- Backup important stuff