diff options
Diffstat (limited to 'ymir/mlmmj-expose.nix')
-rw-r--r-- | ymir/mlmmj-expose.nix | 11 |
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) |