From dd84b6d803de6c2c3fe7826a7c32b1eb0e314067 Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Wed, 19 Jun 2019 09:22:41 -0400 Subject: style --- fsmgr.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fsmgr.hs b/fsmgr.hs index 796863d..fa114ec 100644 --- a/fsmgr.hs +++ b/fsmgr.hs @@ -88,7 +88,7 @@ buildRoot DiskImageConfig{..} finalOut = do {- 5. create a backup snapshot -} cmd_ "umount" [mountpoint] cmd_ "mount -t btrfs -o subvol=/" [out, mountpoint] - flip actionCatch (\(SomeException _) -> return ()) $ cmd_ "btrfs subvolume delete" [mountpoint "root~orig"] + ignoreErrors $ cmd_ "btrfs subvolume delete" [mountpoint "root~orig"] cmd_ "btrfs subvolume snapshot -r" [mountpoint "root", mountpoint "root~orig"] -- cleanup @@ -97,6 +97,9 @@ buildRoot DiskImageConfig{..} finalOut = do cmd_ "btrfstune -S1" [out] cmd_ "mv" [out, finalOut] +ignoreErrors :: Action () -> Action () +ignoreErrors = flip actionCatch (\(SomeException _) -> return ()) + partitionPackages :: [String] -> ([String], [String]) partitionPackages = partition (elem '/') -- cgit v1.2.3