lra / mackup

Keep your application settings in sync (OS X/Linux)
GNU General Public License v3.0
14.6k stars 932 forks source link

Possible to do a brew bundle export? #1508

Open jmuchovej opened 4 years ago

jmuchovej commented 4 years ago

Broadly, adding official support for brew bundle

So glad I found this, handles quite a bit of what I've done with shell scripting. Apologies on the long post, I figured it would be easier to outline everything as much as possible. 😅

Inspiration / Background:

I've haphazardly automated some of my config backups and package installation, but mackup does a better job generalizing than I have, at least on the config side. 😀

Does it make sense for mackup to potentially support acting as a [rudimetnary] package exporter/installer?

Preliminary thoughts on what supporting this might entail:

Naïvely (I currently do this with a local application file, in ~/.mackup):

More nicely (a personal favorite)

Notes on specifying file locations:

jmuchovej commented 4 years ago

@lra so, I just saw: #1291 – forgot to take a gander through PRs. 😅 i think it's definitely possible to consider this (~/.Brewfile) to be a globally accepted config. however, it's only used in a brew bundle install and brew bundle dump – this is less of a program config and more of an OS config, per se. (if that makes sense?)

It's not super clear, at least from what I've seen, that the explicit goal of mackup is just to manage program configurations, which is why I had hoped supporting brew-bundle might be a feasible thing to do. (definitely don't mind doing it, just wanted to raise the topic before putting dev time into it.)

jamiew commented 4 years ago

I also sync my ~/.Brewfile with mackup via a custom .cfg file... doing the dump and restore automatically seems a little overkill, but I think it could be useful to revisit #1291.

I personally consider my ~/.Brewfile to functionally be my system-wide configuration for homebrew, in the same way I have configurations for specific apps

jmuchovej commented 4 years ago

I personally consider my ~/.Brewfile to functionally be my system-wide configuration for homebrew, in the same way I have configurations for specific apps

I don't think it makes much sense to care a lot about Brewfiles that aren't ~/.Brewfile. Mostly because homebrew doesn't support something analogous to a virtualenv. Kinda adding support for not really pursuing the dumping/restoring I was talking about.

I also sync my ~/.Brewfile with mackup via a custom .cfg file... doing the dump and restore automatically seems a little overkill, but I think it could be useful to revisit #1291.

I'm currently doing the same with a custom .cfg. While I don't find adding a "dump/restore functionality" to be overkill, I could definitely see how/why it might not fit into the goals of mackup.

lra commented 4 years ago

If the ~/.Brewfile is now officially supported, we can add it to the database for sure: Screen Shot 2020-02-26 at 9 27 07 PM

PR welcome!

krubenok commented 2 years ago

If the ~/.Brewfile is now officially supported, we can add it to the database for sure

That location is the officially sanctioned place to read a "global" brew file, but it's not the default location that brew files get written to. By default it writes to "Brewfile" (no .) in whatever directory you're currently in. In practice, this means that means that most people's Brewfiles are probably located at ~/Brewfile and not ~/.Brewfile.

Bummer. Thoughts?