From f559ccaf738535ad4b0ebb0b520542055d8ae305 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 11 Nov 2014 12:33:04 -0400 Subject: reorg --- src/Propellor/Keyring.hs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/Propellor/Keyring.hs b/src/Propellor/Keyring.hs index 8a9c833c..c3018eb9 100644 --- a/src/Propellor/Keyring.hs +++ b/src/Propellor/Keyring.hs @@ -3,6 +3,9 @@ module Propellor.Keyring where import Propellor import Utility.SafeCommand +keyring :: FilePath +keyring = privDataDir "keyring.gpg" + addKey :: String -> IO () addKey keyid = exitBool =<< allM id [ gpg, gitadd, gitconfig, gitcommit ] where @@ -30,6 +33,13 @@ addKey keyid = exitBool =<< allM id [ gpg, gitadd, gitconfig, gitcommit ] , Param "propellor addkey" ] + gpgopts = + [ "--options" + , "/dev/null" + , "--no-default-keyring" + , "--keyring", keyring + ] + {- Automatically sign the commit if there'a a keyring. -} gitCommit :: [CommandParam] -> IO Bool gitCommit ps = do @@ -38,9 +48,3 @@ gitCommit ps = do [ Just (Param "commit") , if k then Just (Param "--gpg-sign") else Nothing ] ++ map Just ps - -keyring :: FilePath -keyring = privDataDir "keyring.gpg" - -gpgopts :: [String] -gpgopts = ["--options", "/dev/null", "--no-default-keyring", "--keyring", keyring] -- cgit v1.2.3