aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Howell2009-05-25 11:56:30 +0100
committerMax Howell2009-05-25 12:00:53 +0100
commitbdc02ad69674991a5dc7517a52ee8afadce5430f (patch)
tree522f5521244b8a5fab1850f3d135ca79cec374dd
parent21bbb46ae6f3b16962701c836d41bde791baba06 (diff)
downloadbrew-bdc02ad69674991a5dc7517a52ee8afadce5430f.tar.bz2
Owner made term a full project
He requested I remove the gist
-rw-r--r--Cellar/homebrew/brewkit.rb10
-rw-r--r--Formula/term.rb17
2 files changed, 24 insertions, 3 deletions
diff --git a/Cellar/homebrew/brewkit.rb b/Cellar/homebrew/brewkit.rb
index 65ac2fb4c..8965e3bf5 100644
--- a/Cellar/homebrew/brewkit.rb
+++ b/Cellar/homebrew/brewkit.rb
@@ -104,7 +104,8 @@ class Formula
raise
end
ensure
- FileUtils.rm_rf tmp
+ FileUtils.rm_rf tmp if tmp
+ FileUtils.rm tgz if tgz and not self.cache?
end
ohai 'Finishing up'
@@ -176,6 +177,10 @@ protected
raise "Too many folders in uncompressed result. You need to reimplement the Recipe.uncompress function." if entries.length > 1
return entries.first
end
+
+ def cache?
+ true
+ end
private
def method_added(method)
@@ -193,6 +198,9 @@ class UncompressedScriptFormula < Formula
def uncompress path
path.dirname
end
+ def cache?
+ false
+ end
end
class GithubGistFormula < Formula
diff --git a/Formula/term.rb b/Formula/term.rb
index cc06723f7..fb8149a3c 100644
--- a/Formula/term.rb
+++ b/Formula/term.rb
@@ -3,6 +3,19 @@ require 'brewkit'
require 'fileutils'
homepage='http://gist.github.com/116587'
-url='http://gist.github.com/raw/116587/f253c26290fc0b79cd4ce5584b03585b311c28d8/term'
-GithubGistFormula.new(url, '184301c748e1df92f07dee7879f17a08') \ No newline at end of file
+class TermFormula < UncompressedScriptFormula
+ def initialize
+ super('http://github.com/liyanage/macosx-shell-scripts/raw/e29f7eaa1eb13d78056dec85dc517626ab1d93e3/term')
+ @md5='1bbf4509a50224b27ac8c20d3fe8682e'
+ @version='2.1'
+ end
+end
+
+term=TermFormula.new
+term.brew do |prefix|
+ bin=(prefix+'bin')
+ bin.mkpath
+ FileUtils.cp term.name, bin
+ nil
+end \ No newline at end of file