summaryrefslogtreecommitdiff
path: root/kiki.hs
diff options
context:
space:
mode:
Diffstat (limited to 'kiki.hs')
-rw-r--r--kiki.hs12
1 files changed, 7 insertions, 5 deletions
diff --git a/kiki.hs b/kiki.hs
index 0be591d..7c0c4b2 100644
--- a/kiki.hs
+++ b/kiki.hs
@@ -1310,6 +1310,8 @@ kiki "merge" args = do
1310 val = either (\subkeys -> if subkeys then KF_Subkeys else KF_All) 1310 val = either (\subkeys -> if subkeys then KF_Subkeys else KF_All)
1311 KF_Match 1311 KF_Match
1312 mtch 1312 mtch
1313
1314 parseFlow :: String -> Maybe ((Bool,Bool),Either Bool String)
1313 parseFlow spec = 1315 parseFlow spec =
1314 if null bads 1316 if null bads
1315 then Just ( ( "spill" `elem` goods 1317 then Just ( ( "spill" `elem` goods
@@ -1395,17 +1397,17 @@ kiki "merge" args = do
1395 Left ("access",Just "auto") -> ( flow { access = AutoAccess }, op ) 1397 Left ("access",Just "auto") -> ( flow { access = AutoAccess }, op )
1396 Left ("home",mb) -> 1398 Left ("home",mb) ->
1397 ( flow 1399 ( flow
1398 , op { opFiles = Map.insert HomePub flow { typ=KeyRingFile 1400 , op { opFiles = Map.insert HomePub (flow { typ=KeyRingFile
1399 , access=Pub } 1401 , access=Pub })
1400 $ Map.insert HomeSec flow { typ=KeyRingFile 1402 $ Map.insert HomeSec (flow { typ=KeyRingFile
1401 , access=Sec } 1403 , access=Sec })
1402 $ opFiles op 1404 $ opFiles op
1403 , opHome = opHome op `mplus` mb 1405 , opHome = opHome op `mplus` mb
1404 } 1406 }
1405 ) 1407 )
1406 Left ("flow",Just flowspec) -> 1408 Left ("flow",Just flowspec) ->
1407 case parseFlow flowspec of 1409 case parseFlow flowspec of
1408 Just ( (fil,spil), mtch ) -> 1410 Just ( (spil,fil), mtch ) ->
1409 ( updateFlow fil spil mtch flow 1411 ( updateFlow fil spil mtch flow
1410 , op ) 1412 , op )
1411 Nothing -> error "Valid flow words are: spill,fill,sync,subkeys or match=KEYSPEC" 1413 Nothing -> error "Valid flow words are: spill,fill,sync,subkeys or match=KEYSPEC"