diff options
Diffstat (limited to 'Formula/grc.rb')
| -rw-r--r-- | Formula/grc.rb | 62 |
1 files changed, 32 insertions, 30 deletions
diff --git a/Formula/grc.rb b/Formula/grc.rb index c80cabf96..7f6db90b0 100644 --- a/Formula/grc.rb +++ b/Formula/grc.rb @@ -1,6 +1,4 @@ -$:.unshift "#{File.dirname __FILE__}/../Cellar/homebrew" #rubysucks require 'brewkit' -require 'fileutils' def profile_string <<-sput @@ -33,36 +31,40 @@ case ARGV[0] end ######################################################################### cook -homepage='http://korpus.juls.savba.sk/~garabik/software/grc.html' -url='http://korpus.juls.savba.sk/~garabik/software/grc/grc_1.1.tar.gz' -md5='eeb612aba2fff14cbaf1f3bec7e1eb60' +class Grc <Formula + @homepage='http://korpus.juls.savba.sk/~garabik/software/grc.html' + @url='http://korpus.juls.savba.sk/~garabik/software/grc/grc_1.1.tar.gz' + @md5='eeb612aba2fff14cbaf1f3bec7e1eb60' -Formula.new(url, md5).brew do |prefix| - ohai "make" - #TODO we should deprefixify since it's python and thus possible - inreplace 'grc', '/etc', prefix+'etc' - inreplace 'grc.1', '/etc', prefix+'etc' - inreplace 'grcat', '/usr/local', prefix - inreplace 'grcat.1', '/usr/local', prefix + def install + ohai "make" + #TODO we should deprefixify since it's python and thus possible + inreplace 'grc', '/etc', prefix+'etc' + inreplace 'grc.1', '/etc', prefix+'etc' + inreplace 'grcat', '/usr/local', prefix + inreplace 'grcat.1', '/usr/local', prefix - FileUtils.mkpath prefix - Dir.chdir prefix do - FileUtils.mkpath 'bin' - FileUtils.mkpath 'share/grc' - FileUtils.mkpath 'share/man/man1' - FileUtils.mkpath 'etc' - end - - `cp -fv grc grcat #{prefix}/bin` - `cp -fv conf.* #{prefix}/share/grc` - `cp -fv grc.conf #{prefix}/etc` - `cp -fv grc.1 grcat.1 #{prefix}/share/man/man1` + FileUtils.mkpath prefix + Dir.chdir prefix do + FileUtils.mkpath 'bin' + FileUtils.mkpath 'share/grc' + FileUtils.mkpath 'share/man/man1' + FileUtils.mkpath 'etc' + end - <<-nruter -grc won't work as is. One option is to add some aliases to your ~/.profile -file. Homebrew can do that for you, just execute this command: + `cp -fv grc grcat #{prefix}/bin` + `cp -fv conf.* #{prefix}/share/grc` + `cp -fv grc.conf #{prefix}/etc` + `cp -fv grc.1 grcat.1 #{prefix}/share/man/man1` + end + + def caveats + <<-EOS + grc won't work as is. One option is to add some aliases to your ~/.profile + file. Homebrew can do that for you, just execute this command: - ruby #{$0} --profile >> ~/.profile + ruby #{$0} --profile >> ~/.profile -nruter -end + EOS + end +end
\ No newline at end of file |
