summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2016-06-02 02:21:48 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2016-06-02 02:21:48 +0200
commitcf011a5213354674eef0a0dbe838ce83edd4042c (patch)
tree86357f0cabdcc6cf4045bc17a9d7a19312777636
parentd74bfc9abea133bd4ea676343e23c13dc02806ed (diff)
downloadnixos-cf011a5213354674eef0a0dbe838ce83edd4042c.tar
nixos-cf011a5213354674eef0a0dbe838ce83edd4042c.tar.gz
nixos-cf011a5213354674eef0a0dbe838ce83edd4042c.tar.bz2
nixos-cf011a5213354674eef0a0dbe838ce83edd4042c.tar.xz
nixos-cf011a5213354674eef0a0dbe838ce83edd4042c.zip
typos
-rw-r--r--ymir/mlmmj-expose.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/ymir/mlmmj-expose.nix b/ymir/mlmmj-expose.nix
index d48bed18..2158cd35 100644
--- a/ymir/mlmmj-expose.nix
+++ b/ymir/mlmmj-expose.nix
@@ -39,11 +39,11 @@ let
39 [listDir, (Base64.decodeLenient -> extension)] -> do 39 [listDir, (Base64.decodeLenient -> extension)] -> do
40 setCurrentDirectory listDir 40 setCurrentDirectory listDir
41 key <- (BS.readFile "exposed.key") `catchIOError` (\e -> if isDoesNotExistError e then randomKey >>= (\k -> BS.writeFile "exposed.key" k >> return k) else ioError e) 41 key <- (BS.readFile "exposed.key") `catchIOError` (\e -> if isDoesNotExistError e then randomKey >>= (\k -> BS.writeFile "exposed.key" k >> return k) else ioError e)
42 let (((map toLower -> ident), (map toLower -> recipient)) :: (String, String)) = read . CLBS.unpack $ decryptMsg CBC key recipientExt 42 let ((map toLower -> ident), (map toLower -> recipient)) = read . CLBS.unpack $ decryptMsg CBC key extension
43 identities <- (read <$> readFile "exposed.ids") `catchIOError` (\e -> if isDoesNotExistError e then return [] else ioError e) 43 identities <- (read <$> readFile "exposed.ids") `catchIOError` (\e -> if isDoesNotExistError e then return [] else ioError e)
44 unless (ident `elem` identities) . die $ "Unknown sender: ‘" ++ ident ++ "’" 44 unless (ident `elem` identities) . die $ "Unknown sender: ‘" ++ ident ++ "’"
45 subscribers <- getSubscribers 45 subscribers <- getSubscribers
46 unless (recipient `elem` subscribers) . dio $ "Unknown recipient: ‘" ++ recipient ++ "’" 46 unless (recipient `elem` subscribers) . die $ "Unknown recipient: ‘" ++ recipient ++ "’"
47 getContents >>= writeFile "queue/exposed" 47 getContents >>= writeFile "queue/exposed"
48 callProcess "${pkgs.mlmmj}/bin/mlmmj-send" ["-L", listDir, "-l", "6", "-m", "queue/exposed", "-T", recipient] 48 callProcess "${pkgs.mlmmj}/bin/mlmmj-send" ["-L", listDir, "-l", "6", "-m", "queue/exposed", "-T", recipient]
49 _ -> hPutStrLn stderr ("Called without expected arguments (<listDirectory> <recipientExtension>)") >> exitWith (ExitFailure 2) 49 _ -> hPutStrLn stderr ("Called without expected arguments (<listDirectory> <recipientExtension>)") >> exitWith (ExitFailure 2)
@@ -66,7 +66,7 @@ let
66 identities <- (read <$> readFile "exposed.ids") `catchIOError` (\e -> if isDoesNotExistError e then return [] else ioError e) 66 identities <- (read <$> readFile "exposed.ids") `catchIOError` (\e -> if isDoesNotExistError e then return [] else ioError e)
67 unless (ident `elem` identities) . die $ "Unknown sender: ‘" ++ ident ++ "’" 67 unless (ident `elem` identities) . die $ "Unknown sender: ‘" ++ ident ++ "’"
68 subscribers <- getSubscribers 68 subscribers <- getSubscribers
69 unless (recipient `elem` subscribers) . dio $ "Unknown recipient: ‘" ++ recipient ++ "’" 69 unless (recipient `elem` subscribers) . die $ "Unknown recipient: ‘" ++ recipient ++ "’"
70 encryptMsg CBC key (CLBS.pack . show $ (ident, recipient)) >>= CLBS.putStrLn 70 encryptMsg CBC key (CLBS.pack . show $ (ident, recipient)) >>= CLBS.putStrLn
71 _ -> hPutStrLn stderr ("Called without expected arguments (<listDirectory> <senderIdentity> <recipient>)") >> exitWith (ExitFailure 2) 71 _ -> hPutStrLn stderr ("Called without expected arguments (<listDirectory> <senderIdentity> <recipient>)") >> exitWith (ExitFailure 2)
72 _ -> hPutStrLn stderr ("Called under unsupported name ‘" ++ progName ++ "’") >> exitWith (ExitFailure 2) 72 _ -> hPutStrLn stderr ("Called under unsupported name ‘" ++ progName ++ "’") >> exitWith (ExitFailure 2)