From 665c0fbdaafab7b3ea2737f302a8951f26e4f01a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 31 May 2012 23:33:07 -0400 Subject: check at configure time for sha commands in Mac OSX location --- Build/Configure.hs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'Build') diff --git a/Build/Configure.hs b/Build/Configure.hs index 86a347924..2f79297ee 100644 --- a/Build/Configure.hs +++ b/Build/Configure.hs @@ -6,6 +6,7 @@ import System.Directory import Data.List import System.Cmd.Utils import Control.Applicative +import System.FilePath import Build.TestConfig import Utility.SafeCommand @@ -30,12 +31,17 @@ tests = shaTestCases :: Bool -> [Int] -> [TestCase] shaTestCases required l = map make l - where make n = - let - cmds = map (\x -> "sha" ++ show n ++ x) ["", "sum"] - key = "sha" ++ show n - selector = if required then selectCmd else maybeSelectCmd - in TestCase key $ selector key cmds " [x, osxpath x]) $ + map (\x -> "sha" ++ show n ++ x) ["", "sum"] + -- Max OSX puts GNU tools outside PATH, so look in + -- the location it uses, and remember where to run them + -- from. + osxpath = "/opt/local/libexec/gnubin" tmpDir :: String tmpDir = "tmp" -- cgit v1.2.3