brews = [] | |
out = IO.popen("brew list", "r") do |io| | |
brews = io.read.split "\n" | |
end | |
def parse(brew, brew_info) | |
in_options = false | |
print "brew reinstall -v #{brew} " | |
brew_info.split("\n").each do |m| | |
#puts m.inspect | |
if in_options | |
m.scan(/(--[a-zA-Z-]+)/).each do |x| | |
print x[0] + " " | |
end | |
#puts matchdata.inspect | |
in_options = false | |
end | |
if /\*$/.match m | |
in_options = true | |
end | |
end | |
puts | |
end | |
brews.each do |brew| | |
#puts "brew info #{brew}" | |
IO.popen("brew info #{brew}", "r") do |info| | |
parse(brew, info.read) | |
end | |
end |
This comment has been minimized.
This comment has been minimized.
I am getting warnings like FYI, referred here from https://github.com/mxcl/homebrew/wiki/C++-Standard-Libraries |
This comment has been minimized.
This comment has been minimized.
i think replacing the |
This comment has been minimized.
This comment has been minimized.
Indeed! I replaced |
This comment has been minimized.
This comment has been minimized.
After changing I fired this up |
This comment has been minimized.
This comment has been minimized.
Good idea, I've updated it to use the reinstall command. |
This comment has been minimized.
This comment has been minimized.
I'm getting this error from running
|
This comment has been minimized.
This comment has been minimized.
This is an error with parsing utf8 symbols. You can force to use other encoding (for instance cp1252) in line 27: IO.popen("brew info #{brew}", "r:cp1252") do |info| I don't speak ruby so maybe this is not the best solution but it works. |
This comment has been minimized.
This comment has been minimized.
Doesn't this script simply reinstall all installed packages (preserving options)? I found a link to this script on the wiki (https://github.com/Homebrew/homebrew/wiki/C++-Standard-Libraries) which claims that it only reinstalls root packages, whatever that means:
However, |
This comment has been minimized.
This comment has been minimized.
I had a problem with incompatible with the standard library, libstd c++. To fix this, found the incompatible formulary, uninstall it, and reinstall it. Then go back to the formulary that has the install error and resintall it. Keep doing this until there is no error. Error
Fix
Not familiar with much of |
This comment has been minimized.
Extra thanks to @stepheneb for the improvements!