# PS4='+ $(date "+%2N") '
# allow failure in case there are no snapshots yet.
# shellcheck disable=SC2012
- shopt -u nullglob
- files=($btrbk_root/$vol.20*)
shopt -s nullglob
- snaps=()
- if (( ${#files[@]} )); then
- snaps=($(ls -1avdr "${files[@]}" 2>/dev/null |head -n1 || : ))
+ files=($btrbk_root/$vol.20*)
+ shopt -u nullglob
+ if (( ! ${#files[@]} )); then
+ continue
fi
+ snaps=($(ls -1avdr "${files[@]}" 2>/dev/null |head -n1 || : ))
now=$EPOCHSECONDS
maxtime=0
for s in ${snaps[@]}; do