From 69d7e2a797de67fb038e035d999fc3abac02303e Mon Sep 17 00:00:00 2001 From: Max Howell Date: Tue, 4 Aug 2009 00:26:07 +0100 Subject: [PATCH] FIX brew install before Cache has yet been created Closes Homebrew/homebrew#7 Cache directory is created when downloading tarballs, but the new hw.model stuff compiles the hw.model.c file there. --- Library/Homebrew/hw.model.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Library/Homebrew/hw.model.rb b/Library/Homebrew/hw.model.rb index 6ff81fb6e3..a88bccb2eb 100644 --- a/Library/Homebrew/hw.model.rb +++ b/Library/Homebrew/hw.model.rb @@ -1,4 +1,6 @@ def hw_model_output + require 'fileutils' + FileUtils.mkpath HOMEBREW_CACHE exe=Pathname.new(HOMEBREW_CACHE)+'hw.model' Kernel.system "gcc -Os #{File.dirname __FILE__}/hw.model.c -o #{exe}" unless exe.file? /(.*)(\d+),(\d+)/ =~ `#{exe}`