From c29e2202e1270c493b1c469e39d528abe7957365 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 22 Jun 2016 00:45:05 +0200 Subject: fixed delivery --- ymir/mlmmj-expose.nix | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/ymir/mlmmj-expose.nix b/ymir/mlmmj-expose.nix index febc6ae0..81392fef 100644 --- a/ymir/mlmmj-expose.nix +++ b/ymir/mlmmj-expose.nix @@ -30,8 +30,6 @@ let -- import Data.Hex - import Debug.Trace - main :: IO () main = do progName <- takeFileName <$> getProgName @@ -43,12 +41,11 @@ let setCurrentDirectory listDir identities <- getIdentities subscribers <- getSubscribers - let hashes = filter ((==) extension . snd) $ traceShowId [((ident, sub), hash' (ident, sub)) | ident <- identities, sub <- subscribers] + let hashes = filter ((==) extension . snd) [((ident, sub), hash' (ident, sub)) | ident <- identities, sub <- subscribers] case hashes of - [(_, recipient)] -> do - putStrLn $ show ["-L", listDir, "-l", "6", "-m", "queue/exposed", "-T", recipient] - -- getContents >>= writeFile "queue/exposed" - -- callProcess "${pkgs.mlmmj}/bin/mlmmj-send" ["-L", listDir, "-l", "6", "-m", "queue/exposed", "-T", recipient] + [((_, recipient), _)] -> do + getContents >>= writeFile "queue/exposed" + callProcess "${pkgs.mlmmj}/bin/mlmmj-send" ["-L", listDir, "-l", "6", "-m", "queue/exposed", "-T", recipient] [] -> die "Unknown extension" _ -> die "Ambiguous extension" _ -> hPutStrLn stderr ("Called without expected arguments ( )") >> exitWith (ExitFailure 2) -- cgit v1.2.3