From f8ada7688c5a4abf0b37e736368b6b1b4a6baac9 Mon Sep 17 00:00:00 2001 From: Les De Ridder Date: Sun, 5 Jun 2016 05:33:37 +0000 Subject: [PATCH] Use a file to ignore subvolumes when bootstrapping When a file with a special name, .btrfish-ignore, exists in the root of a subvolume, this subvolume is skipped during the bootstrapping process. --- bootstrap.fish | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bootstrap.fish b/bootstrap.fish index 8c75e6d..11029da 100755 --- a/bootstrap.fish +++ b/bootstrap.fish @@ -22,8 +22,12 @@ for pair in (get-subvol-mounts) set safepath $subvoldir/$safename if not test -d $safepath - sudo btrfs subvolume snapshot -r $mount $safepath - set snapshots $snapshots $safepath + if not test -f $mount/.btrfish-ignore + sudo btrfs subvolume snapshot -r $mount $safepath + set snapshots $snapshots $safepath + else + echo ".btrfish-ignore found in $mount, skipping..." + end end end