diff options
Diffstat (limited to 'Remote/S3.hs')
-rw-r--r-- | Remote/S3.hs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Remote/S3.hs b/Remote/S3.hs index 7971faa8f..489114b12 100644 --- a/Remote/S3.hs +++ b/Remote/S3.hs @@ -28,7 +28,11 @@ import UUID import Config remote :: RemoteType Annex -remote = RemoteType { typename = "S3", generator = gen } +remote = RemoteType { + typename = "S3", + generator = gen, + setup = s3Setup +} gen :: Annex (RemoteGenerator Annex) gen = do @@ -68,8 +72,7 @@ genRemote r u = do removeKey = error "TODO", hasKey = error "TODO", hasKeyCheap = False, - config = Nothing, - setup = \_ -> return () + config = Nothing } s3Connection :: Git.Repo -> Annex (Maybe AWSConnection) @@ -102,6 +105,10 @@ getS3Config r s def = do where envvar = "ANNEX_" ++ map (\c -> if c == '-' then '_' else toUpper c) s +s3Setup :: UUID -> M.Map String String -> Annex (M.Map String String) +s3Setup u c = do + return c + {- The UUID of a S3 bucket is stored in a file "git-annex-uuid" in the - bucket. Gets the UUID, or if there is none, sets a new UUID, possibly - also creating the bucket. -} |