From 981dba1b35f5d570830644d64339080b24023aaa Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Tue, 8 Sep 2009 15:31:28 -0700 Subject: Function to return a binary's Mach-O architectures Added a utility method to get an array of architecture names for a given executable. This will be useful for, say, figuring out what Python was compiled for, to know what to compile a C-based module as. Signed Off By: Max Howell I added a test and made the function use `which` if the path provided is not absolute. I considered allowing relative paths, but then it is possible for the function to take eg. the svn binary from the current directory when you meant the one in the path, and that could be a confusing bug. --- Library/Homebrew/unittest.rb | 9 +++++++++ Library/Homebrew/utils.rb | 21 +++++++++++++++++++++ 2 files changed, 30 insertions(+) (limited to 'Library/Homebrew') diff --git a/Library/Homebrew/unittest.rb b/Library/Homebrew/unittest.rb index ba93e33ec..ae8b0c1bc 100755 --- a/Library/Homebrew/unittest.rb +++ b/Library/Homebrew/unittest.rb @@ -415,6 +415,15 @@ class BeerTasting