2011-01-07 06:15:23 +00:00
|
|
|
{- git-annex main program stub
|
2010-10-27 20:53:54 +00:00
|
|
|
-
|
2012-03-15 16:00:19 +00:00
|
|
|
- Copyright 2010,2012 Joey Hess <joey@kitenet.net>
|
2010-10-27 20:53:54 +00:00
|
|
|
-
|
|
|
|
- Licensed under the GNU GPL version 3 or higher.
|
|
|
|
-}
|
2010-10-10 04:18:16 +00:00
|
|
|
|
2010-12-30 20:52:24 +00:00
|
|
|
import System.Environment
|
2012-03-15 16:00:19 +00:00
|
|
|
import System.FilePath
|
2010-10-16 20:20:49 +00:00
|
|
|
|
2012-03-15 16:00:19 +00:00
|
|
|
import qualified GitAnnex
|
|
|
|
import qualified GitAnnexShell
|
2011-03-08 22:05:20 +00:00
|
|
|
|
2010-10-31 18:32:18 +00:00
|
|
|
main :: IO ()
|
2012-03-15 16:00:19 +00:00
|
|
|
main = run =<< getProgName
|
|
|
|
where
|
|
|
|
run n
|
|
|
|
| isshell n = go GitAnnexShell.run
|
|
|
|
| otherwise = go GitAnnex.run
|
|
|
|
isshell n = takeFileName n == "git-annex-shell"
|
|
|
|
go a = a =<< getArgs
|