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

@ -34,7 +34,7 @@ start file = notBareRepo $ do
unless inbackend $ error $
"key ("++keyName key++") is not present in backend"
showStart "fromkey" file
return $ Just $ perform file
next $ perform file
perform :: FilePath -> CommandPerform
perform file = do
@ -42,7 +42,7 @@ perform file = do
link <- calcGitLink file key
liftIO $ createDirectoryIfMissing True (parentDir file)
liftIO $ createSymbolicLink link file
return $ Just $ cleanup file
next $ cleanup file
cleanup :: FilePath -> CommandCleanup
cleanup file = do