diff options
author | Joey Hess <joey@kitenet.net> | 2012-05-31 23:33:07 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-05-31 23:33:07 -0400 |
commit | 665c0fbdaafab7b3ea2737f302a8951f26e4f01a (patch) | |
tree | 8dac9f699e7e5a2aaf49da30421a8cb2bdb91919 | |
parent | 2183fd2abd95b6deaa9baef47e2f9c5f865123e1 (diff) |
check at configure time for sha commands in Mac OSX location
-rw-r--r-- | Build/Configure.hs | 18 | ||||
-rw-r--r-- | doc/install/OSX.mdwn | 3 |
2 files changed, 12 insertions, 9 deletions
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 "</dev/null" + where + make n = TestCase key $ selector key (shacmds n) "</dev/null" + where + key = "sha" ++ show n + selector = if required then selectCmd else maybeSelectCmd + shacmds n = concatMap (\x -> [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" diff --git a/doc/install/OSX.mdwn b/doc/install/OSX.mdwn index 08904aef9..1d8a3b943 100644 --- a/doc/install/OSX.mdwn +++ b/doc/install/OSX.mdwn @@ -7,9 +7,6 @@ sudo port install git-core ossp-uuid md5sha1sum coreutils pcre sudo ln -s /opt/local/include/pcre.h /usr/include/pcre.h # This is hack that allows pcre-light to find pcre -# this will enable the gnu tools, (to give sha256sum etc..., it does not override the BSD userland) -export PATH=$PATH:/opt/local/libexec/gnubin - git clone git://git-annex.branchable.com/ git-annex cd git-annex git checkout ghc7.0 |