summaryrefslogtreecommitdiff
path: root/ymir
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2016-06-22 00:45:05 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2016-06-22 00:45:05 +0200
commitc29e2202e1270c493b1c469e39d528abe7957365 (patch)
treea5d9469ff09c6e820b0e069860ac7a3ea2a151b7 /ymir
parent3a9beb2de046b6eee4768e7b787f2f5c49b91808 (diff)
downloadnixos-c29e2202e1270c493b1c469e39d528abe7957365.tar
nixos-c29e2202e1270c493b1c469e39d528abe7957365.tar.gz
nixos-c29e2202e1270c493b1c469e39d528abe7957365.tar.bz2
nixos-c29e2202e1270c493b1c469e39d528abe7957365.tar.xz
nixos-c29e2202e1270c493b1c469e39d528abe7957365.zip
fixed delivery
Diffstat (limited to 'ymir')
-rw-r--r--ymir/mlmmj-expose.nix11
1 files 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
30 30
31 -- import Data.Hex 31 -- import Data.Hex
32 32
33 import Debug.Trace
34
35 main :: IO () 33 main :: IO ()
36 main = do 34 main = do
37 progName <- takeFileName <$> getProgName 35 progName <- takeFileName <$> getProgName
@@ -43,12 +41,11 @@ let
43 setCurrentDirectory listDir 41 setCurrentDirectory listDir
44 identities <- getIdentities 42 identities <- getIdentities
45 subscribers <- getSubscribers 43 subscribers <- getSubscribers
46 let hashes = filter ((==) extension . snd) $ traceShowId [((ident, sub), hash' (ident, sub)) | ident <- identities, sub <- subscribers] 44 let hashes = filter ((==) extension . snd) [((ident, sub), hash' (ident, sub)) | ident <- identities, sub <- subscribers]
47 case hashes of 45 case hashes of
48 [(_, recipient)] -> do 46 [((_, recipient), _)] -> do
49 putStrLn $ show ["-L", listDir, "-l", "6", "-m", "queue/exposed", "-T", recipient] 47 getContents >>= writeFile "queue/exposed"
50 -- getContents >>= writeFile "queue/exposed" 48 callProcess "${pkgs.mlmmj}/bin/mlmmj-send" ["-L", listDir, "-l", "6", "-m", "queue/exposed", "-T", recipient]
51 -- callProcess "${pkgs.mlmmj}/bin/mlmmj-send" ["-L", listDir, "-l", "6", "-m", "queue/exposed", "-T", recipient]
52 [] -> die "Unknown extension" 49 [] -> die "Unknown extension"
53 _ -> die "Ambiguous extension" 50 _ -> die "Ambiguous extension"
54 _ -> hPutStrLn stderr ("Called without expected arguments (<listDirectory> <recipientExtension>)") >> exitWith (ExitFailure 2) 51 _ -> hPutStrLn stderr ("Called without expected arguments (<listDirectory> <recipientExtension>)") >> exitWith (ExitFailure 2)