small fixes

This commit is contained in:
Vincent Riquer 2025-11-10 00:52:23 +01:00
parent 66bdede3e8
commit 77db837c39
4 changed files with 17 additions and 16 deletions

22
atom
View File

@ -266,7 +266,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
@ -592,11 +592,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 ))
@ -645,7 +646,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"\
@ -662,7 +663,7 @@ do
${minutes:-0} \
${seconds:-0} \
${avgdsec:-0}.${avgdmsec:-0}
if ! (( concurrency ))
if ! (( concurrency )) && ! (( cron ))
then
if (( active ))
then
@ -710,7 +711,8 @@ endtime=$EPOCHSECONDS
${minutes:+$minutes minutes and} \
$seconds seconds."
(( cron )) || echo -en "\033[K"
echo
(( ran )) && echo
if (( failed ))
then
echo $'\nFailed tasks:\n'
@ -923,10 +925,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
@ -977,9 +979,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

View File

@ -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

View File

@ -71,5 +71,6 @@ getFiles() {
then
echo "$count files found${new:+, $new new or changed}." \
$'\033[K'
fi
unset count
}

View File

@ -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
}