Last active
August 29, 2015 19:47
-
-
Save unasuke/465d360e73a9718d8980 to your computer and use it in GitHub Desktop.
BrewfileをShell Scriptに変換するRuby Script
This file contains 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/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