Open bradical opened 3 years ago
I think so? I think the bootstrap gets run first, and then install scripts get run separately afterwards, so brew should be around at that point.
is that how you would recommend doing it or is there some other way to handle installing brew packages on setup? seemed like you might have done something else in the past and the moved away from it?
I think I had some casks set up for installing macOS apps, but moved away from that. But yeah, I'd do this otherwise (and tbh, probably should, haha. It's been awhile since I seriously took a real look at my dotfiles!)
I know this repo used to have a Brewfile
for installing brew software - I'm using one in my dotfiles: https://github.com/jacobwgillespie/dotfiles/blob/main/Brewfile. You can install regular formulae, casks, fonts, even App Store apps.
brew bundle
will install everything listed in the Brewfile
, which is nice. I have a call to brew bundle
in my setup script. In this repo, bin/dot
does install Homebrew before executing the install.sh
files, so you could add brew bundle
to any install.sh
or directly to dot
.
Another cool thing that brew bundle
can do is brew bundle cleanup
. That will print all the things you have installed manually that are not in your Brewfile
. And then brew bundle cleanup -f
will actually uninstall those extra packages. In this way you can use a Brewfile
as the source-of-truth for what's installed with Brew on your machine, and pretty easily find anything not covered and either add it or let Brew clean it up.
Yeah, that's rad- I had a Brewfile before, but pulled it out for some reason that I can't quite remember. I think part of it might have been it didn't integrate as closely with the App Store (although it looks like that's more reasonable to do now). I also didn't know about bundle cleanup
; that's really cool.
Would you expect this to work? I'm a little unclear on the order of things and whether brew would be available at the time. My example is something like:
postgresql/install.sh
Wasn't sure if there was a better technique for installing a bunch of brew things as part of install
Still digging these years later. Thanks!