list standard groups in vicfg
This commit is contained in:
parent
cfe07a2573
commit
cf7fec4b46
2 changed files with 8 additions and 3 deletions
|
@ -21,6 +21,7 @@ import Types.Group
|
||||||
import Logs.Trust
|
import Logs.Trust
|
||||||
import Logs.Group
|
import Logs.Group
|
||||||
import Logs.PreferredContent
|
import Logs.PreferredContent
|
||||||
|
import Types.StandardGroups
|
||||||
import Remote
|
import Remote
|
||||||
|
|
||||||
def :: [Command]
|
def :: [Command]
|
||||||
|
@ -94,20 +95,23 @@ genCfg cfg descs = unlines $ concat [intro, trust, groups, preferredcontent]
|
||||||
trust = settings cfgTrustMap
|
trust = settings cfgTrustMap
|
||||||
[ ""
|
[ ""
|
||||||
, com "Repository trust configuration"
|
, com "Repository trust configuration"
|
||||||
, com "(Valid trust levels: " ++
|
, com "(Valid trust levels: " ++ trustlevels ++ ")"
|
||||||
unwords (map showTrustLevel [Trusted .. DeadTrusted]) ++
|
|
||||||
")"
|
|
||||||
]
|
]
|
||||||
(\(t, u) -> line "trust" u $ showTrustLevel t)
|
(\(t, u) -> line "trust" u $ showTrustLevel t)
|
||||||
(\u -> lcom $ line "trust" u $ showTrustLevel SemiTrusted)
|
(\u -> lcom $ line "trust" u $ showTrustLevel SemiTrusted)
|
||||||
|
where
|
||||||
|
trustlevels = unwords $ map showTrustLevel [Trusted .. DeadTrusted]
|
||||||
|
|
||||||
groups = settings cfgGroupMap
|
groups = settings cfgGroupMap
|
||||||
[ ""
|
[ ""
|
||||||
, com "Repository groups"
|
, com "Repository groups"
|
||||||
|
, com $ "(Standard groups: " ++ grouplist ++ ")"
|
||||||
, com "(Separate group names with spaces)"
|
, com "(Separate group names with spaces)"
|
||||||
]
|
]
|
||||||
(\(s, u) -> line "group" u $ unwords $ S.toList s)
|
(\(s, u) -> line "group" u $ unwords $ S.toList s)
|
||||||
(\u -> lcom $ line "group" u "")
|
(\u -> lcom $ line "group" u "")
|
||||||
|
where
|
||||||
|
grouplist = unwords $ map fromStandardGroup [minBound..]
|
||||||
|
|
||||||
preferredcontent = settings cfgPreferredContentMap
|
preferredcontent = settings cfgPreferredContentMap
|
||||||
[ ""
|
[ ""
|
||||||
|
|
|
@ -13,3 +13,4 @@ The same is not currently done for repository groups
|
||||||
|
|
||||||
Thanks.
|
Thanks.
|
||||||
|
|
||||||
|
> [[done]] --[[Joey]]
|
||||||
|
|
Loading…
Add table
Reference in a new issue