propellor spin

This commit is contained in:
Joey Hess 2014-07-17 23:41:17 -04:00
parent 62f4e58985
commit 93a2b92f62
Failed to extract signature
1 changed files with 7 additions and 6 deletions

View File

@ -49,12 +49,13 @@ mappedFile f setup = setup f
-- Note that multiline configurations that continue onto the next line
-- are not currently supported.
dedupMainCf :: Property
dedupMainCf = fileProperty "postfix main.cf dedupped" go mainCf
where
go ls =
let parsed = map parse ls
in dedup [] (keycounts $ rights parsed) parsed
dedupMainCf = fileProperty "postfix main.cf dedupped" dedupCf mainCf
dedupCf :: [String] -> [String]
dedupCf ls =
let parsed = map parse ls
in dedup [] (keycounts $ rights parsed) parsed
where
parse l
| "#" `isPrefixOf` l = Left l
| "=" `isInfixOf` l =