aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Howell2009-05-25 11:58:26 +0100
committerMax Howell2009-05-25 12:01:01 +0100
commitd2c7fcac29b1a2725f52e66a8147ccbc66e9666e (patch)
tree216295aa922e096a7538713a7c83f340d30031ff
parent7bb66cf93a44ef97cf7caa5585e0bbf12727267e (diff)
downloadbrew-d2c7fcac29b1a2725f52e66a8147ccbc66e9666e.tar.bz2
Split appsupport out into function
-rw-r--r--Cellar/homebrew/brewkit.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/Cellar/homebrew/brewkit.rb b/Cellar/homebrew/brewkit.rb
index e05073b2e..f0daa48c8 100644
--- a/Cellar/homebrew/brewkit.rb
+++ b/Cellar/homebrew/brewkit.rb
@@ -29,6 +29,11 @@ def ohai title
puts "\033[0;34m==>\033[0;0;1m #{title[0,n]}\033[0;0m"
end
+def appsupport
+ appsupport = File.expand_path "~/Library/Application Support/Homebrew"
+ FileUtils.mkpath appsupport unless File.exist? appsupport
+ return appsupport
+end
class Formula
require 'find'
@@ -70,8 +75,6 @@ class Formula
ohai "Downloading #{@url}"
- appsupport = File.expand_path "~/Library/Application Support/Homebrew"
- FileUtils.mkpath appsupport unless File.exist? appsupport
Dir.chdir appsupport do
tgz=Pathname.new(fetch()).realpath
md5=`md5 -q "#{tgz}"`.strip