diff options
| author | Adam Vandenberg | 2012-02-20 22:04:21 -0800 |
|---|---|---|
| committer | Adam Vandenberg | 2012-02-24 21:35:50 -0800 |
| commit | d3f35542992c4978525b1eaaa0255c92f1e830e0 (patch) | |
| tree | 499df60efe14b16e641247313cdd07416af1290a /Library/Formula/runit.rb | |
| parent | 9c77e1cefce38f2a3001ce398ad0b4dc2f668243 (diff) | |
| download | homebrew-d3f35542992c4978525b1eaaa0255c92f1e830e0.tar.bz2 | |
Use "cd" instead of "Dir.chdir"
* And "mkdir" isntead of "Dir.mkdir"
* And "Dir[]" instead of "Dir.glob"
* Also style fixes and nitpicks
Diffstat (limited to 'Library/Formula/runit.rb')
| -rw-r--r-- | Library/Formula/runit.rb | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/Library/Formula/runit.rb b/Library/Formula/runit.rb index 9b8721209..706e0526f 100644 --- a/Library/Formula/runit.rb +++ b/Library/Formula/runit.rb @@ -1,32 +1,32 @@ require 'formula' class Runit < Formula - url 'http://smarden.org/runit/runit-2.1.1.tar.gz' homepage 'http://smarden.org/runit' + url 'http://smarden.org/runit/runit-2.1.1.tar.gz' md5 '8fa53ea8f71d88da9503f62793336bc3' def install # Runit untars to 'admin/runit-VERSION' - Dir.chdir("runit-2.1.1") + cd "runit-2.1.1" do + # Per the installation doc on OS X, we need to make a couple changes. + system "echo 'cc -Xlinker -x' >src/conf-ld" + inreplace 'src/Makefile', / -static/, '' - # Per the installation doc on OS X, we need to make a couple changes. - system "echo 'cc -Xlinker -x' >src/conf-ld" - inreplace 'src/Makefile', / -static/, '' + inreplace 'src/sv.c', "char *varservice =\"/service/\";", "char *varservice =\"#{var}/service/\";" + system "package/compile" - inreplace 'src/sv.c', "char *varservice =\"/service/\";", "char *varservice =\"#{var}/service/\";" - system "package/compile" + # The commands are compiled and copied into the 'command' directory and + # names added to package/commands. Read the file for the commands and + # install them in homebrew. + rcmds = File.open("package/commands").read - # The commands are compiled and copied into the 'command' directory and - # names added to package/commands. Read the file for the commands and - # install them in homebrew. - rcmds = File.open("package/commands").read + rcmds.each do |r| + bin.install("command/#{r.chomp}") + man8.install("man/#{r.chomp}.8") + end - rcmds.each do |r| - bin.install("command/#{r.chomp}") - man8.install("man/#{r.chomp}.8") + (var + "service").mkpath end - - (var + "service").mkpath end def caveats; <<-EOS.undent |
