5 ms·
I have a stupid question. Is there a dogmatic way of listing installed things and sharing that with other brew? For example, I now list with brew list into a f
by Keyframe 10y ago
I have a stupid question. Is there a dogmatic way of listing installed things and sharing that with other brew?
For example, I now list with brew list into a file and edit the file so that whole list is a big brew install. That way if I reinstall OS or go to another I can have same things.
- avitzurel 10y agoDon't know if there is but that's a great idea. I always had a pain of brew installing on new systems. Especially when you want to lock versions of some things (MySQL etc).
- StyloBill 10y agoNot sure if that's what you wanna do but you could do : "ls /usr/local/Cellar/ | cat >> myInstall.txt"
- sigjuice 10y agoWhy not "ls /usr/local/Cellar >> myInstall.txt" ?
- StyloBill 10y agoI use cat out of habit but yep, you're absolutely correct.
- Keyframe 10y agoI just do this for now: cat <(echo brew install) <(brew list) | sed ':a;N;$!ba;s/\n/ /g' > brew_install.txt It lists directly from brew, prepends brew install and then replaces all newlines with a space and outputs to brew_install.txt
- jfb 10y agoI use brew leaves instead of brew list for this sort of thing; as I usually don't care about the constituent transitive dependencies, only the final results.
- oefrha 10y agoYou can use brew-bundle for that. https://github.com/Homebrew/homebrew-bundle https://github.com/Homebrew/homebrew-bundle On one machine: brew bundle dump On another machine: brew bundle
- Keyframe 10y agoWell, that's a neat approach!