X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=system-status;fp=system-status;h=7d5567d8d16bda261d5672140e7d3e87980dba03;hb=957654ed1672c7ca933583549b9d8e9f37b1c802;hp=cd603ca57e4f982e149107d2aef856ccffb46451;hpb=b186607514fbcf10bd5664ccb759a6e873f048c7;p=distro-setup diff --git a/system-status b/system-status index cd603ca..7d5567d 100755 --- a/system-status +++ b/system-status @@ -140,13 +140,13 @@ write-status() { # 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