diff options
Diffstat (limited to 'Types/StandardGroups.hs')
-rw-r--r-- | Types/StandardGroups.hs | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/Types/StandardGroups.hs b/Types/StandardGroups.hs index 1739c2059..c1ea1fd99 100644 --- a/Types/StandardGroups.hs +++ b/Types/StandardGroups.hs @@ -7,31 +7,35 @@ module Types.StandardGroups where -data StandardGroup = ClientGroup | TransferGroup | ArchiveGroup | BackupGroup +data StandardGroup = ClientGroup | TransferGroup | BackupGroup | SmallArchiveGroup | FullArchiveGroup deriving (Eq, Ord, Enum, Bounded, Show) fromStandardGroup :: StandardGroup -> String fromStandardGroup ClientGroup = "client" fromStandardGroup TransferGroup = "transfer" -fromStandardGroup ArchiveGroup = "archive" fromStandardGroup BackupGroup = "backup" +fromStandardGroup SmallArchiveGroup = "smallarchive" +fromStandardGroup FullArchiveGroup = "archive" toStandardGroup :: String -> Maybe StandardGroup toStandardGroup "client" = Just ClientGroup toStandardGroup "transfer" = Just TransferGroup -toStandardGroup "archive" = Just ArchiveGroup toStandardGroup "backup" = Just BackupGroup +toStandardGroup "smallarchive" = Just SmallArchiveGroup +toStandardGroup "archive" = Just FullArchiveGroup toStandardGroup _ = Nothing descStandardGroup :: StandardGroup -> String descStandardGroup ClientGroup = "client: a repository on your computer" descStandardGroup TransferGroup = "transfer: distributes files to clients" -descStandardGroup ArchiveGroup = "archive: collects files that are not archived elsewhere" -descStandardGroup BackupGroup = "backup: collects all files" +descStandardGroup BackupGroup = "backup: backs up all files" +descStandardGroup SmallArchiveGroup = "small archive: archives files located in \"archive\" directories" +descStandardGroup FullArchiveGroup = "full archive: archives all files not archived elsewhere" {- See doc/preferred_content.mdwn for explanations of these expressions. -} preferredContent :: StandardGroup -> String -preferredContent ClientGroup = "exclude=*/archive/*" +preferredContent ClientGroup = "exclude=*/archive/* and exclude=archive/*" preferredContent TransferGroup = "not (inallgroup=client and copies=client:2) and " ++ preferredContent ClientGroup -preferredContent ArchiveGroup = "not copies=archive:1" preferredContent BackupGroup = "" -- all content is preferred +preferredContent SmallArchiveGroup = "(include=*/archive/* or include=archive/*) and " ++ preferredContent FullArchiveGroup +preferredContent FullArchiveGroup = "not (copies=archive:1 or copies=smallarchive:1)" |