summaryrefslogtreecommitdiff
path: root/lib/archroot.sh
diff options
context:
space:
mode:
Diffstat (limited to 'lib/archroot.sh')
-rw-r--r--lib/archroot.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/archroot.sh b/lib/archroot.sh
index 87c28a2..6b1b52e 100644
--- a/lib/archroot.sh
+++ b/lib/archroot.sh
@@ -34,6 +34,14 @@ is_subvolume() {
}
##
+# usage : is_same_fs( $path_a, $path_b )
+# return : whether $path_a and $path_b are on the same filesystem
+##
+is_same_fs() {
+ [[ "$(stat -c %d "$1")" == "$(stat -c %d "$1")" ]]
+}
+
+##
# usage : subvolume_delete_recursive( $path )
#
# Find all btrfs subvolumes under and including $path and delete them.