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.
This commit is contained in:
parent
a734b30a68
commit
69d7e2a797
@ -1,4 +1,6 @@
|
|||||||
def hw_model_output
|
def hw_model_output
|
||||||
|
require 'fileutils'
|
||||||
|
FileUtils.mkpath HOMEBREW_CACHE
|
||||||
exe=Pathname.new(HOMEBREW_CACHE)+'hw.model'
|
exe=Pathname.new(HOMEBREW_CACHE)+'hw.model'
|
||||||
Kernel.system "gcc -Os #{File.dirname __FILE__}/hw.model.c -o #{exe}" unless exe.file?
|
Kernel.system "gcc -Os #{File.dirname __FILE__}/hw.model.c -o #{exe}" unless exe.file?
|
||||||
/(.*)(\d+),(\d+)/ =~ `#{exe}`
|
/(.*)(\d+),(\d+)/ =~ `#{exe}`
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user