Rename h1 to ohai (for the lulz)
This commit is contained in:
parent
ef7dd6363d
commit
0b0fa48c31
@ -12,7 +12,7 @@ ENV['CPPFLAGS']="-I#{$cellar.parent}/include"
|
|||||||
ENV['LDFLAGS']="-L#{$cellar.parent}/lib"
|
ENV['LDFLAGS']="-L#{$cellar.parent}/lib"
|
||||||
|
|
||||||
|
|
||||||
def h1 title
|
def ohai title
|
||||||
puts "\033[0;34m==>\033[0;0;1m #{title} \033[0;0m"
|
puts "\033[0;34m==>\033[0;0;1m #{title} \033[0;0m"
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ class Formula
|
|||||||
prefix=$cellar+@name+@version
|
prefix=$cellar+@name+@version
|
||||||
raise "#{prefix} already exists!" if prefix.exist?
|
raise "#{prefix} already exists!" if prefix.exist?
|
||||||
|
|
||||||
h1 "Preparing build"
|
ohai "Preparing build"
|
||||||
|
|
||||||
appsupport = File.expand_path "~/Library/Application Support/Homebrew"
|
appsupport = File.expand_path "~/Library/Application Support/Homebrew"
|
||||||
FileUtils.mkpath appsupport unless File.exist? appsupport
|
FileUtils.mkpath appsupport unless File.exist? appsupport
|
||||||
@ -72,9 +72,9 @@ class Formula
|
|||||||
Dir.chdir uncompress(tgz) do
|
Dir.chdir uncompress(tgz) do
|
||||||
caveats = yield prefix
|
caveats = yield prefix
|
||||||
if caveats
|
if caveats
|
||||||
h1 "Caveats"
|
ohai "Caveats"
|
||||||
puts caveats
|
puts caveats
|
||||||
h1 "Summary"
|
ohai "Summary"
|
||||||
end
|
end
|
||||||
#TODO copy changelog or CHANGES file to pkg root,
|
#TODO copy changelog or CHANGES file to pkg root,
|
||||||
#TODO maybe README, etc. to versioned root
|
#TODO maybe README, etc. to versioned root
|
||||||
@ -136,7 +136,7 @@ def inreplace(path, before, after)
|
|||||||
end
|
end
|
||||||
|
|
||||||
def system cmd
|
def system cmd
|
||||||
h1 cmd
|
ohai cmd
|
||||||
|
|
||||||
out=''
|
out=''
|
||||||
IO.popen("#{cmd} 2>1") do |f|
|
IO.popen("#{cmd} 2>1") do |f|
|
||||||
|
@ -6,7 +6,7 @@ url='http://ftp.digitalmars.com/dmd.1.043.zip'
|
|||||||
md5='6c83b7296cb84090a9ebc11ab0fb94a2'
|
md5='6c83b7296cb84090a9ebc11ab0fb94a2'
|
||||||
|
|
||||||
Formula.new(url, md5).brew do |prefix|
|
Formula.new(url, md5).brew do |prefix|
|
||||||
h1 "make"
|
ohai "make"
|
||||||
prefix.mkpath
|
prefix.mkpath
|
||||||
FileUtils.cp_r 'osx/bin', prefix
|
FileUtils.cp_r 'osx/bin', prefix
|
||||||
FileUtils.cp_r 'osx/lib', prefix
|
FileUtils.cp_r 'osx/lib', prefix
|
||||||
|
@ -38,7 +38,7 @@ url='http://korpus.juls.savba.sk/~garabik/software/grc/grc_1.1.tar.gz'
|
|||||||
md5='eeb612aba2fff14cbaf1f3bec7e1eb60'
|
md5='eeb612aba2fff14cbaf1f3bec7e1eb60'
|
||||||
|
|
||||||
Formula.new(url, md5).brew do |prefix|
|
Formula.new(url, md5).brew do |prefix|
|
||||||
h1 "make"
|
ohai "make"
|
||||||
#TODO we should deprefixify since it's python and thus possible
|
#TODO we should deprefixify since it's python and thus possible
|
||||||
inreplace 'grc', '/etc', prefix+'/etc'
|
inreplace 'grc', '/etc', prefix+'/etc'
|
||||||
inreplace 'grc.1', '/etc', prefix+'/etc'
|
inreplace 'grc.1', '/etc', prefix+'/etc'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user