3 ms·
I record everything that I do, for initial setup or otherwise, in a large text file and/or cloud document holding blocks of shell instructions like: # set up
by zackmorris 4y ago
I record everything that I do, for initial setup or otherwise, in a large text file and/or cloud document holding blocks of shell instructions like:
# set up stuff
(
VAR=<stuff>
curl <stuff>
<do-something-with> "$VAR"
brew install <stuff> # or apt-get install <stuff>
# ...
)
I write them so I can paste them into the shell at any time and keep my environment updated declaratively, without having to think. This way I never store any local state, not even command aliases. Otherwise I start getting attached to my setup, which leads to anxiety.
It's good practice to check out a project repo periodically and see what it takes to get running inside a fresh OS or user. It's handy to do while onboarding new developers too. Sometimes I'll even put these setup instructions at the top of the project repo's readme itself, so it doesn't have a dependency on anything external.