propellor spin
This commit is contained in:
parent
62f4e58985
commit
93a2b92f62
|
@ -49,12 +49,13 @@ mappedFile f setup = setup f
|
||||||
-- Note that multiline configurations that continue onto the next line
|
-- Note that multiline configurations that continue onto the next line
|
||||||
-- are not currently supported.
|
-- are not currently supported.
|
||||||
dedupMainCf :: Property
|
dedupMainCf :: Property
|
||||||
dedupMainCf = fileProperty "postfix main.cf dedupped" go mainCf
|
dedupMainCf = fileProperty "postfix main.cf dedupped" dedupCf mainCf
|
||||||
where
|
|
||||||
go ls =
|
dedupCf :: [String] -> [String]
|
||||||
|
dedupCf ls =
|
||||||
let parsed = map parse ls
|
let parsed = map parse ls
|
||||||
in dedup [] (keycounts $ rights parsed) parsed
|
in dedup [] (keycounts $ rights parsed) parsed
|
||||||
|
where
|
||||||
parse l
|
parse l
|
||||||
| "#" `isPrefixOf` l = Left l
|
| "#" `isPrefixOf` l = Left l
|
||||||
| "=" `isInfixOf` l =
|
| "=" `isInfixOf` l =
|
||||||
|
|
Loading…
Reference in New Issue