diff options
author | Joey Hess <joey@kitenet.net> | 2013-04-26 13:00:14 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-04-26 13:01:06 -0400 |
commit | 54c3cf5c7af5019760387cebb3e8da28bf27b676 (patch) | |
tree | 138b3b611fb217bc2ed726caf3800a4217df53fb /Types | |
parent | 088ffe916c11fc9ac8bba6f66a086e282f9c1a50 (diff) |
allow configuring the preferreddir
Diffstat (limited to 'Types')
-rw-r--r-- | Types/StandardGroups.hs | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/Types/StandardGroups.hs b/Types/StandardGroups.hs index e7764d387..30b882282 100644 --- a/Types/StandardGroups.hs +++ b/Types/StandardGroups.hs @@ -50,25 +50,25 @@ toStandardGroup "public" = Just PublicGroup toStandardGroup "unwanted" = Just UnwantedGroup toStandardGroup _ = Nothing -descStandardGroup :: Maybe RemoteConfig -> StandardGroup -> String -descStandardGroup _ ClientGroup = "client: a repository on your computer" -descStandardGroup _ TransferGroup = "transfer: distributes files to clients" -descStandardGroup _ BackupGroup = "full backup: backs up all files" -descStandardGroup _ IncrementalBackupGroup = "incremental backup: backs up files not backed up elsewhere" -descStandardGroup _ SmallArchiveGroup = "small archive: archives files located in \"archive\" directories" -descStandardGroup _ FullArchiveGroup = "full archive: archives all files not archived elsewhere" -descStandardGroup _ SourceGroup = "file source: moves files on to other repositories" -descStandardGroup _ ManualGroup = "manual mode: only stores files you manually choose" -descStandardGroup _ UnwantedGroup = "unwanted: remove content from this repository" -descStandardGroup c PublicGroup = "public: only stores files located in \"" ++ fromJust (specialDirectory c PublicGroup) ++ "\" directories" +descStandardGroup :: StandardGroup -> String +descStandardGroup ClientGroup = "client: a repository on your computer" +descStandardGroup TransferGroup = "transfer: distributes files to clients" +descStandardGroup BackupGroup = "full backup: backs up all files" +descStandardGroup IncrementalBackupGroup = "incremental backup: backs up files not backed up elsewhere" +descStandardGroup SmallArchiveGroup = "small archive: archives files located in \"archive\" directories" +descStandardGroup FullArchiveGroup = "full archive: archives all files not archived elsewhere" +descStandardGroup SourceGroup = "file source: moves files on to other repositories" +descStandardGroup ManualGroup = "manual mode: only stores files you manually choose" +descStandardGroup UnwantedGroup = "unwanted: remove content from this repository" +descStandardGroup PublicGroup = "public: publishes files located in an associated directory" -specialDirectory :: Maybe RemoteConfig -> StandardGroup -> Maybe FilePath -specialDirectory _ SmallArchiveGroup = Just "archive" -specialDirectory _ FullArchiveGroup = Just "archive" -specialDirectory (Just c) PublicGroup = Just $ +associatedDirectory :: Maybe RemoteConfig -> StandardGroup -> Maybe FilePath +associatedDirectory _ SmallArchiveGroup = Just "archive" +associatedDirectory _ FullArchiveGroup = Just "archive" +associatedDirectory (Just c) PublicGroup = Just $ fromMaybe "public" $ M.lookup "preferreddir" c -specialDirectory Nothing PublicGroup = Just "public" -specialDirectory _ _ = Nothing +associatedDirectory Nothing PublicGroup = Just "public" +associatedDirectory _ _ = Nothing {- See doc/preferred_content.mdwn for explanations of these expressions. -} preferredContent :: StandardGroup -> String |