From 7a52b34e0631609d5d862c3ba100cc499b30b5fa Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 30 Dec 2010 16:52:24 -0400 Subject: add git-annex-shell command This is not yet complete, as it does not allow starting rsync or scp. --- git-annex.hs | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) (limited to 'git-annex.hs') diff --git a/git-annex.hs b/git-annex.hs index b8176befa..6c143972a 100644 --- a/git-annex.hs +++ b/git-annex.hs @@ -5,10 +5,11 @@ - Licensed under the GNU GPL version 3 or higher. -} -import System.Console.GetOpt +import System.Environment import CmdLine import Command +import Options import qualified Command.Add import qualified Command.Unannex @@ -57,25 +58,7 @@ cmds = concat , Command.Find.command ] -options :: [Option] -options = [ - Option ['f'] ["force"] (NoArg (storeOptBool "force" True)) - "allow actions that may lose annexed data" - , Option ['q'] ["quiet"] (NoArg (storeOptBool "quiet" True)) - "avoid verbose output" - , Option ['v'] ["verbose"] (NoArg (storeOptBool "quiet" False)) - "allow verbose output" - , Option ['b'] ["backend"] (ReqArg (storeOptString "backend") paramName) - "specify default key-value backend to use" - , Option ['k'] ["key"] (ReqArg (storeOptString "key") paramKey) - "specify a key to use" - , Option ['t'] ["to"] (ReqArg (storeOptString "torepository") paramRemote) - "specify to where to transfer content" - , Option ['f'] ["from"] (ReqArg (storeOptString "fromrepository") paramRemote) - "specify from where to transfer content" - , Option ['x'] ["exclude"] (ReqArg (storeOptString "exclude") paramGlob) - "skip files matching the glob pattern" - ] - main :: IO () -main = cmdLine cmds options "Usage: git-annex subcommand [option ..]" +main = do + args <- getArgs + dispatch args cmds commonOptions "Usage: git-annex command [option ..]" -- cgit v1.2.3