summaryrefslogtreecommitdiff
path: root/git-annex.hs
diff options
context:
space:
mode:
Diffstat (limited to 'git-annex.hs')
-rw-r--r--git-annex.hs24
1 files changed, 11 insertions, 13 deletions
diff --git a/git-annex.hs b/git-annex.hs
index ca8eecd2a..e30d320b9 100644
--- a/git-annex.hs
+++ b/git-annex.hs
@@ -1,6 +1,6 @@
{- git-annex main program dispatch
-
- - Copyright 2010-2014 Joey Hess <id@joeyh.name>
+ - Copyright 2010-2016 Joey Hess <id@joeyh.name>
-
- Licensed under the GNU GPL version 3 or higher.
-}
@@ -13,7 +13,9 @@ import Network.Socket (withSocketsDo)
import qualified CmdLine.GitAnnex
import qualified CmdLine.GitAnnexShell
+import qualified CmdLine.GitRemoteTorAnnex
import qualified Test
+import Utility.FileSystemEncoding
#ifdef mingw32_HOST_OS
import Utility.UserInfo
@@ -22,21 +24,17 @@ import Utility.Env
main :: IO ()
main = withSocketsDo $ do
+ useFileSystemEncoding
ps <- getArgs
- run ps =<< getProgName
- where
- run ps n
- | isshell n = CmdLine.GitAnnexShell.run ps
- | otherwise =
#ifdef mingw32_HOST_OS
- do
- winEnv
- gitannex ps
-#else
- gitannex ps
+ winEnv
#endif
- gitannex = CmdLine.GitAnnex.run Test.optParser Test.runner
- isshell n = takeFileName n == "git-annex-shell"
+ run ps =<< getProgName
+ where
+ run ps n = case takeFileName n of
+ "git-annex-shell" -> CmdLine.GitAnnexShell.run ps
+ "git-remote-tor-annex" -> CmdLine.GitRemoteTorAnnex.run ps
+ _ -> CmdLine.GitAnnex.run Test.optParser Test.runner ps
#ifdef mingw32_HOST_OS
{- On Windows, if HOME is not set, probe it and set it.