In git this is not not executable because it's meant to be installed
using ./install-my-scripts
-If latest subvols \$@ are not mounted, exit 1, print message, and print
+If latest subvols \$@ are not mounted, print a message, and print
the unstale subvol name into /nocow/btrfs-stale/\$subvol
Fresh is opposite of stale. To be fresh, either SUBVOL_MOUNTPOINT is a
if $stale; then
mkdir -p $stale_dir
printf "%s\n" $freshest_snap > $stale_file
- ret=1
else
rm -f $stale_file
fi
fi
}
-ret=0
for d; do
vol=${d##*/}
# second field, non-comment line == $d
)
if [[ ! $last_snap ]]; then
# should not happen.
- echo "$0: error: could not find latest snapshot for $svp among ${snaps[*]}"
- ret=1
- continue
+ echo "$0: error: could not find latest snapshot for $svp among ${snaps[*]}" >&2
+ exit 1
fi
if [[ ! -e $svp ]]; then
fi
stale-file
-
done
-exit $ret
# if latest is already mounted, make sure binds are mounted and move on
- if e check-subvol-stale $d; then
+ e check-subvol-stale $d
+ if [[ -e /nocow/btrfs-stale/${d##*/} ]] ; then
mnt $d
for b in ${binds[@]}; do
mnt $b