### begin check if leaf is different, delete it if not ###
if [[ -e /a/opt/btrfs-snapshots-diff/btrfs-snapshots-diff.py ]]; then
### begin check if leaf is different, delete it if not ###
if [[ -e /a/opt/btrfs-snapshots-diff/btrfs-snapshots-diff.py ]]; then
parentid=$(btrfs sub show $leaf | awk '$1 == "Parent" && $2 == "UUID:" {print $3}')
bsubs=(/mnt/root/btrbk/$vol.*)
bsub=
parentid=$(btrfs sub show $leaf | awk '$1 == "Parent" && $2 == "UUID:" {print $3}')
bsubs=(/mnt/root/btrbk/$vol.*)
bsub=
if (( $(stat -c%s $tmp) < 1000)); then
# example output for an empty diff:
# Found a valid Btrfs stream header, version 1
if (( $(stat -c%s $tmp) < 1000)); then
# example output for an empty diff:
# Found a valid Btrfs stream header, version 1
# Note, we make a few assumptions in this script, like
# $d was not a different subvol id than $vol, and
# things otherwise didn't get mounted very strangely.
# Note, we make a few assumptions in this script, like
# $d was not a different subvol id than $vol, and
# things otherwise didn't get mounted very strangely.