git-annex-shell mostly done now, only needs 2 more subcommands
This commit is contained in:
parent
7a52b34e06
commit
a5a302b77d
6 changed files with 130 additions and 55 deletions
|
@ -8,9 +8,7 @@
|
|||
module CmdLine (
|
||||
dispatch,
|
||||
parseCmd,
|
||||
Option,
|
||||
storeOptBool,
|
||||
storeOptString,
|
||||
usage,
|
||||
) where
|
||||
|
||||
import System.Console.GetOpt
|
||||
|
@ -27,9 +25,8 @@ import Upgrade
|
|||
import Options
|
||||
|
||||
{- Runs the passed command line. -}
|
||||
dispatch :: [String] -> [Command] -> [Option] -> String -> IO ()
|
||||
dispatch args cmds options header = do
|
||||
gitrepo <- Git.repoFromCwd
|
||||
dispatch :: Git.Repo -> [String] -> [Command] -> [Option] -> String -> IO ()
|
||||
dispatch gitrepo args cmds options header = do
|
||||
state <- Annex.new gitrepo allBackends
|
||||
(actions, state') <- Annex.run state $ parseCmd args header cmds options
|
||||
tryRun state' $ [startup, upgrade] ++ actions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue