summaryrefslogtreecommitdiff
path: root/Command/FromKey.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-12-30 14:19:16 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-12-30 14:19:16 -0400
commit6a5be9d53cad9ee2988c6d54001f387dfe1f2716 (patch)
treebae7346474d2ae932b856f1d70a0fca187ca6454 /Command/FromKey.hs
parent14d59b40fb4f3a4c9a89266fecae91a0daf08088 (diff)
rename some stuff and prepare to break out more into Command/*
Diffstat (limited to 'Command/FromKey.hs')
-rw-r--r--Command/FromKey.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Command/FromKey.hs b/Command/FromKey.hs
index eb9ad5e51..991428136 100644
--- a/Command/FromKey.hs
+++ b/Command/FromKey.hs
@@ -20,11 +20,11 @@ import Types
import Core
import Messages
-seek :: [SubCmdSeek]
+seek :: [CommandSeek]
seek = [withFilesMissing start]
{- Adds a file pointing at a manually-specified key -}
-start :: SubCmdStartString
+start :: CommandStartString
start file = do
keyname <- Annex.flagGet "key"
when (null keyname) $ error "please specify the key with --key"
@@ -36,13 +36,13 @@ start file = do
"key ("++keyname++") is not present in backend"
showStart "fromkey" file
return $ Just $ perform file key
-perform :: FilePath -> Key -> SubCmdPerform
+perform :: FilePath -> Key -> CommandPerform
perform file key = do
link <- calcGitLink file key
liftIO $ createDirectoryIfMissing True (parentDir file)
liftIO $ createSymbolicLink link file
return $ Just $ cleanup file
-cleanup :: FilePath -> SubCmdCleanup
+cleanup :: FilePath -> CommandCleanup
cleanup file = do
Annex.queue "add" ["--"] file
return True