diff options
| author | Joey Hess <joeyh@joeyh.name> | 2017-02-04 17:07:32 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2017-02-04 17:07:32 -0400 |
| commit | 8f37ddf53da31987f3db01d51fd9119d1e0c8a1d (patch) | |
| tree | 786d557ab7d083137e1bf0a18a5eae1c5fd9d18d /src/Propellor/Property/Rsync.hs | |
| parent | 5ff45a37b1ffde8fe9150815d81236354c89e20b (diff) | |
| parent | 25f6871e1dda3de252fbc6c8ac6962eb0cd9311a (diff) | |
Merge remote-tracking branch 'wzhd/archlinux'
Diffstat (limited to 'src/Propellor/Property/Rsync.hs')
| -rw-r--r-- | src/Propellor/Property/Rsync.hs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Propellor/Property/Rsync.hs b/src/Propellor/Property/Rsync.hs index b40396de..53baa74e 100644 --- a/src/Propellor/Property/Rsync.hs +++ b/src/Propellor/Property/Rsync.hs @@ -2,6 +2,7 @@ module Propellor.Property.Rsync where import Propellor.Base import qualified Propellor.Property.Apt as Apt +import qualified Propellor.Property.Pacman as Pacman type Src = FilePath type Dest = FilePath @@ -16,7 +17,7 @@ filesUnder d = Pattern (d ++ "/*") -- | Ensures that the Dest directory exists and has identical contents as -- the Src directory. -syncDir :: Src -> Dest -> Property DebianLike +syncDir :: Src -> Dest -> Property (DebianLike + ArchLinux) syncDir = syncDirFiltered [] data Filter @@ -43,7 +44,7 @@ newtype Pattern = Pattern String -- Rsync checks each name to be transferred against its list of Filter -- rules, and the first matching one is acted on. If no matching rule -- is found, the file is processed. -syncDirFiltered :: [Filter] -> Src -> Dest -> Property DebianLike +syncDirFiltered :: [Filter] -> Src -> Dest -> Property (DebianLike + ArchLinux) syncDirFiltered filters src dest = rsync $ [ "-av" -- Add trailing '/' to get rsync to sync the Dest directory, @@ -56,7 +57,7 @@ syncDirFiltered filters src dest = rsync $ , "--quiet" ] ++ map toRsync filters -rsync :: [String] -> Property DebianLike +rsync :: [String] -> Property (DebianLike + ArchLinux) rsync ps = cmdProperty "rsync" ps `assume` MadeChange - `requires` Apt.installed ["rsync"] + `requires` Apt.installed ["rsync"] `pickOS` Pacman.installed ["rsync"] |
