refactor some boilerplate

This commit is contained in:
Joey Hess 2011-05-15 02:02:46 -04:00
parent b400984ddf
commit 56bc3e95ca
31 changed files with 93 additions and 86 deletions

View file

@ -39,7 +39,7 @@ start params = notBareRepo $ do
t <- findType fullconfig
showStart "initremote" name
return $ Just $ perform t u $ M.union config c
next $ perform t u $ M.union config c
where
ws = words params
@ -49,7 +49,7 @@ start params = notBareRepo $ do
perform :: RemoteClass.RemoteType Annex -> UUID -> RemoteClass.RemoteConfig -> CommandPerform
perform t u c = do
c' <- RemoteClass.setup t u c
return $ Just $ cleanup u c'
next $ cleanup u c'
cleanup :: UUID -> RemoteClass.RemoteConfig -> CommandCleanup
cleanup u c = do