Opinionated scripts to bootstrap my new Mac workstations when I get them. This
doesn't happen all too often, but in between home, work, desktops, laptops,
catastrophic hardware failures, etc., it happens more often than I'd like!
Core Philosophy
After years of messing with various solutions for this problem, I've tried a lot
of different solutions and evaluated a bunch of different approaches.
As a result of these forays, there are a few things bootslap is opinionated
about:
Stand on the shoulders of giants.Homebrew is the best way to manage CLI tools on OSX.
Homebrew Cask is the best way to manage binary applications on OSX.
Make sure these providers are used for automatic installations as well, so
that we can take advantage of their expansive and well maintained libraries.
Install as much as possible via default tools in default locations.
Doing things in a nonstandard way or putting files in a nonstandard location
means you might hit state bugs the general populace won't. This also means
you aren't tied to bootslap in the future -- you can use it once to set stuff
up and then throw it away later.
Do everything in an idempotent way.
Tasks should be runnable at any time, creating/repairing installations when
needed, ignoring stuff if already exists. You should be able to run the
bootstrap script on a fully up-to-date workstation after making a single
change, only only that one change will be applied to the machine, and it will
happen fast.
Favor simplicity over modularity.
Goal is for the entire codebase to be understandable and modifiable
directly by anyone seeking to repurpose this, instead of them relying on me
building in configuration options for whatever they might want to do.
Use the same tools for automatic and interactive modes.
Want to remove something later? Don't need to mess with finding an uninstall
script (assuming one even exists) or going searching all over the hard disk
to figure out where your clever bootstrapper script put stuff. Just brew uninstall foo and it's gone.
请发表评论