aboutsummaryrefslogtreecommitdiff
path: root/git-annex.hs
diff options
context:
space:
mode:
Diffstat (limited to 'git-annex.hs')
-rw-r--r--git-annex.hs14
1 files changed, 11 insertions, 3 deletions
diff --git a/git-annex.hs b/git-annex.hs
index a53697cdb..f5f2f22d7 100644
--- a/git-annex.hs
+++ b/git-annex.hs
@@ -1,13 +1,21 @@
{- git-annex main program stub
-
- - Copyright 2010 Joey Hess <joey@kitenet.net>
+ - Copyright 2010,2012 Joey Hess <joey@kitenet.net>
-
- Licensed under the GNU GPL version 3 or higher.
-}
import System.Environment
+import System.FilePath
-import GitAnnex
+import qualified GitAnnex
+import qualified GitAnnexShell
main :: IO ()
-main = run =<< getArgs
+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