summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Borg.hs
diff options
context:
space:
mode:
authorJoey Hess2019-01-18 02:19:41 -0400
committerJoey Hess2019-01-18 02:19:41 -0400
commitd004b02c1704168ab59e59ec76d7d572c79a0423 (patch)
tree14ef7f324cace020c036d393d7dac5eeb65e3f55 /src/Propellor/Property/Borg.hs
parent3328fb83373adad786e57d4ed47e1d801e14260f (diff)
parentb9d9333e030ac59ea11d435b7e2e4758daff4b4a (diff)
Merge branch 'master' into joeyconfig
Diffstat (limited to 'src/Propellor/Property/Borg.hs')
-rw-r--r--src/Propellor/Property/Borg.hs13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/Propellor/Property/Borg.hs b/src/Propellor/Property/Borg.hs
index 9d49fdf4..f662c8ee 100644
--- a/src/Propellor/Property/Borg.hs
+++ b/src/Propellor/Property/Borg.hs
@@ -59,12 +59,15 @@ runBorgEnv (BorgRepoUsing os _) = map go os
go (UsesEnvVar (k, v)) = (k, v)
installed :: Property DebianLike
-installed = withOS desc $ \w o -> case o of
- (Just (System (Debian _ (Stable "jessie")) _)) -> ensureProperty w $
- Apt.backportInstalled ["borgbackup", "python3-msgpack"]
- _ -> ensureProperty w $
- Apt.installed ["borgbackup"]
+installed = pickOS installdebian aptinstall
where
+ installdebian :: Property Debian
+ installdebian = withOS desc $ \w o -> case o of
+ (Just (System (Debian _ (Stable "jessie")) _)) -> ensureProperty w $
+ Apt.backportInstalled ["borgbackup", "python3-msgpack"]
+ _ -> ensureProperty w $
+ Apt.installed ["borgbackup"]
+ aptinstall = Apt.installed ["borgbackup"] `describe` desc
desc = "installed borgbackup"
repoExists :: BorgRepo -> IO Bool