In git this is not not executable because it's meant to be installed
using ./install-my-scripts
-If latest subvols \$@ are not mounted, print a message, and print
-the unstale subvol name into /nocow/btrfs-stale/\$subvol
+Print the unstale subvol name into /nocow/btrfs-stale/\$subvol
+
+If latest subvols \$@ are not mounted, print a message to terminal.
Fresh is opposite of stale. To be fresh, either SUBVOL_MOUNTPOINT is a
snapshot of the latest, or the latest snapshot is snapshot of
}
# duplicated in mount-latest-sub
+# Reassign $1 var from /dev/dm- to corresponding /dev/mapper/
mapper-dev() {
local mapdev
local -n devref=$1
stale=true
# fresh if $svp has $last_snap as a snapshot,
if btrfs sub show $svp 2>/dev/null | sed '0,/^\s*Snapshot(s):/d;s/^\s*//' | \
- grep -xF ${last_snap#$root_dir/} ; then
+ grep -xF ${last_snap#$root_dir/} >/dev/null; then
stale=false
else # or else $svp is a snapshot of $last_snap. we use a uuid
# comparison, which if I remember from the docs, is a bit more