From 019c080687ce4a07031bdfe2263397f4f868c3c3 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 31 Aug 2016 14:30:35 -0400 Subject: added --store-directory --- CmdLine.hs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'CmdLine.hs') diff --git a/CmdLine.hs b/CmdLine.hs index a8201c8..05ba7da 100644 --- a/CmdLine.hs +++ b/CmdLine.hs @@ -6,6 +6,7 @@ module CmdLine where import Types +import Types.Storage import Tunables import qualified Gpg import Options.Applicative @@ -17,6 +18,7 @@ data CmdLine = CmdLine { mode :: Maybe Mode , secretkeysource :: Maybe SecretKeySource , localstorage :: Bool + , localstoragedirectory :: Maybe LocalStorageDirectory , gui :: Bool , testMode :: Bool , customShareParams :: Maybe ShareParams @@ -36,6 +38,7 @@ parse = CmdLine <$> optional (backup <|> restore <|> uploadqueued <|> server <|> benchmark <|> test) <*> optional (gpgswitch <|> fileswitch) <*> localstorageswitch + <*> localstoragedirectory <*> guiswitch <*> testmodeswitch <*> optional (ShareParams <$> totalobjects <*> neededobjects) @@ -77,7 +80,12 @@ parse = CmdLine ) localstorageswitch = switch ( long "store-local" - <> help "Store data locally, in ~/.keysafe/objects/local/. (The default is to store data in the cloud.)" + <> help "Store data locally. (The default is to store data in the cloud.)" + ) + localstoragedirectory = optional $ LocalStorageDirectory <$> option str + ( long "store-directory" + <> metavar "DIR" + <> help "Where to store data locally. (default: ~/.keysafe/objects/)" ) testmodeswitch = switch ( long "testmode" -- cgit v1.2.3