diff --git a/atom b/atom index d7dcd5c..d60b26e 100755 --- a/atom +++ b/atom @@ -258,7 +258,7 @@ echo 'COMMIT;' >&3 (( cron )) || echo -n $'\r' echo -n "${deleted+$deleted files deleted${removed:+, }}${removed:+$removed removed from database}" (( cron )) || echo -ne "\033[K" -echo +(( deleted || removed )) && echo unset removecount deleted removed removefile updateTags @@ -584,11 +584,12 @@ do if (( timestamp - concurrencychange >= loadinterval )) then if (( concurrency > 1 || allow_zero_running )) \ - && (( load > maxload && concurrency > 0 )) + && (( load > maxload && concurrency )) then concurrencychange=$timestamp (( --concurrency )) - elif (( load < maxload )) && (( active > concurrency - 1 )) + elif (( load < maxload )) \ + && (( active > concurrency - 1 )) then concurrencychange=$timestamp (( ++concurrency )) @@ -637,7 +638,7 @@ do fmtprogress="T:%${#taskcount}i/%i (F:%i) %3i%%" fmttime='%2id %2ih%02im%02is (A:%4.1fs/task)' eta="ETA:$( - printf "%(%c)T" "$(( currenttime + secsremaining )) + printf "%(%c)T" "$(( currenttime + secsremaining ))" )" (( cron )) || printf \ "\r$fmtload $fmtworkers $fmtprogress $fmttime $eta\033[K"\ @@ -654,7 +655,7 @@ do ${minutes:-0} \ ${seconds:-0} \ ${avgdsec:-0}.${avgdmsec:-0} - if ! (( concurrency )) + if ! (( concurrency )) && ! (( cron )) then if (( active )) then @@ -702,7 +703,8 @@ endtime=$EPOCHSECONDS ${minutes:+$minutes minutes and} \ $seconds seconds." (( cron )) || echo -en "\033[K" -echo +(( ran )) && echo + if (( failed )) then echo $'\nFailed tasks:\n' @@ -915,10 +917,10 @@ do (( textunidecodeneeded )) && eval exec "${toascii[1]}>&-" echo 'COMMIT;' >&3 (( cron )) || echo -n $'\r' - (( changedcount )) \ + (( changedcount )) \ && echo -n "$destination: Renamed $changedcount files" (( cron )) || echo -en "\033[K" - echo + (( changedcount )) && echo fi unset count changedcount renamefiles done @@ -969,9 +971,9 @@ echo 'COMMIT;' >&3 (( count )) \ && echo -n "Removed $count obsolete files." (( cron )) || echo -en "\033[K" -echo +(( count )) && echo -echo "Purging empty directories..." +(( debug )) && echo "Purging empty directories..." for path in "${destinationpath[@]}" do find "$path" -type d -empty -delete diff --git a/lib/copy/action b/lib/copy/action index f4d700d..623d148 100644 --- a/lib/copy/action +++ b/lib/copy/action @@ -112,10 +112,8 @@ copyFiles_action() { if (( count )) then (( cron )) || echo -n $'\r' - if (( count )) - then - echo -n "Copied ${done:-0} of $count" \ - "files${postponed+ ($postponed postponed)}." + echo -n "Copied ${done:-0} of $count" \ + "files${postponed+ ($postponed postponed)}." (( cron )) || echo -en "\033[K" echo else diff --git a/lib/files/getFiles b/lib/files/getFiles index 28077bf..8dae04f 100644 --- a/lib/files/getFiles +++ b/lib/files/getFiles @@ -71,5 +71,6 @@ getFiles() { then echo "$count files found${new:+, $new new or changed}." \ $'\033[K' + fi unset count } diff --git a/lib/tags/update b/lib/tags/update index 643bed4..3286e26 100644 --- a/lib/tags/update +++ b/lib/tags/update @@ -207,7 +207,7 @@ echo ' echo 'COMMIT;' >&3 (( cron )) || echo -n $'\r' (( count )) && echo -n "Read tags from $count files." - (( cron )) || echo -n '\033[K' - echo + (( cron )) || echo -n $'\033[K' + (( count )) && echo unset count tagfiles }