aboutsummaryrefslogtreecommitdiff
path: root/git-annex.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-03-15 12:00:19 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-03-15 12:00:19 -0400
commitd2769cf7953657ac9ff6ba2acc27cb71a6543c5d (patch)
treecdd718a7accbd26e7544ff96ab26965e98a48cc5 /git-annex.hs
parent7a65df32236df42d49758ee861237613f501e3c2 (diff)
shave some 12 mb from the installed size
* git-annex now behaves as git-annex-shell if symlinked to and run by that name. The Makefile sets this up, saving some 8 mb of installed size. * git-union-merge is a demo program, so it is no longer built by default.
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