aboutsummaryrefslogtreecommitdiff
path: root/Types/StandardGroups.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-11-24 16:30:15 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-11-24 16:30:15 -0400
commita00262011dc7f4ccac8c5c40d845224c281c56b2 (patch)
treee59997bf6b311fdfdd0ba80d864864c40e78484b /Types/StandardGroups.hs
parentac4be3de323345ab4a6cb4a624b975ac686cc2d5 (diff)
webapp and assistant glacier support
Diffstat (limited to 'Types/StandardGroups.hs')
-rw-r--r--Types/StandardGroups.hs18
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)"