diff options
author | Andrew Cady <d@jerkface.net> | 2019-06-19 09:22:41 -0400 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2019-06-19 09:22:41 -0400 |
commit | dd84b6d803de6c2c3fe7826a7c32b1eb0e314067 (patch) | |
tree | b8183d56117d0d53240d31b9f8dfd085364af360 | |
parent | dad378346e8643291e8f45ee79703e19778ee462 (diff) |
style
-rw-r--r-- | fsmgr.hs | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -88,7 +88,7 @@ buildRoot DiskImageConfig{..} finalOut = do | |||
88 | {- 5. create a backup snapshot -} | 88 | {- 5. create a backup snapshot -} |
89 | cmd_ "umount" [mountpoint] | 89 | cmd_ "umount" [mountpoint] |
90 | cmd_ "mount -t btrfs -o subvol=/" [out, mountpoint] | 90 | cmd_ "mount -t btrfs -o subvol=/" [out, mountpoint] |
91 | flip actionCatch (\(SomeException _) -> return ()) $ cmd_ "btrfs subvolume delete" [mountpoint </> "root~orig"] | 91 | ignoreErrors $ cmd_ "btrfs subvolume delete" [mountpoint </> "root~orig"] |
92 | cmd_ "btrfs subvolume snapshot -r" [mountpoint </> "root", mountpoint </> "root~orig"] | 92 | cmd_ "btrfs subvolume snapshot -r" [mountpoint </> "root", mountpoint </> "root~orig"] |
93 | 93 | ||
94 | -- cleanup | 94 | -- cleanup |
@@ -97,6 +97,9 @@ buildRoot DiskImageConfig{..} finalOut = do | |||
97 | cmd_ "btrfstune -S1" [out] | 97 | cmd_ "btrfstune -S1" [out] |
98 | cmd_ "mv" [out, finalOut] | 98 | cmd_ "mv" [out, finalOut] |
99 | 99 | ||
100 | ignoreErrors :: Action () -> Action () | ||
101 | ignoreErrors = flip actionCatch (\(SomeException _) -> return ()) | ||
102 | |||
100 | partitionPackages :: [String] -> ([String], [String]) | 103 | partitionPackages :: [String] -> ([String], [String]) |
101 | partitionPackages = partition (elem '/') | 104 | partitionPackages = partition (elem '/') |
102 | 105 | ||