Skip to content

Instantly share code, notes, and snippets.

@unasuke
Last active August 29, 2015 19:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save unasuke/465d360e73a9718d8980 to your computer and use it in GitHub Desktop.
Save unasuke/465d360e73a9718d8980 to your computer and use it in GitHub Desktop.
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