Skip to content

Instantly share code, notes, and snippets.

@unasuke
Last active August 29, 2015 19:47
Embed
What would you like to do?
BrewfileをShell Scriptに変換するRuby Script
#!/usr/local/bin/ruby
File::open( ARGV[0] ) {|brewfile|
print "#!/bin/sh"
brewfile.each_line {|line|
if line[0] == "#"|| line.size == 1 then
print line
else
print "brew " + line
end
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment