Created
October 19, 2015 04:28
-
-
Save NewAlexandria/b0d948a8f7fe0e35223b to your computer and use it in GitHub Desktop.
A quickie copypasta for getting your main brew packages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
bl = `brew list`.split ;1 | |
bdl = bl.reduce({}) {|h, pkg| h.merge({pkg => `brew deps #{pkg}`.split }) } ;1 | |
bi = bl - bdl.values.flatten.sort | |
File.open('apps_brew.txt', 'w') {|f| f.write bi.join("\n") } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment