avoid git-annex-shell test

This commit is contained in:
Joey Hess 2014-02-14 13:39:22 -04:00
parent 9f883192af
commit 8fdbd1190d

View file

@ -17,18 +17,18 @@ import qualified Test
#endif #endif
main :: IO () main :: IO ()
main = run =<< getProgName main = do
where
run n
| isshell n = go CmdLine.GitAnnexShell.run
| otherwise = go CmdLine.GitAnnex.run
isshell n = takeFileName n == "git-annex-shell"
go a = do
ps <- getArgs ps <- getArgs
run ps =<< getProgName
where
run ps n
| isshell n = CmdLine.GitAnnexShell.run ps
| otherwise =
#ifdef WITH_TESTSUITE #ifdef WITH_TESTSUITE
case ps of case ps of
("test":ps') -> Test.main ps' ("test":ps') -> Test.main ps'
_ -> a ps _ -> CmdLine.GitAnnex.run ps
#else #else
a ps CmdLine.GitAnnex.run ps
#endif #endif
isshell n = takeFileName n == "git-annex-shell"