chore: Apply shellcheck/shfmt suggestions

This commit is contained in:
Carlos Solís 2025-02-07 19:00:48 +00:00
parent 4095a83511
commit f819f63559
2 changed files with 6 additions and 7 deletions

View file

@ -197,8 +197,7 @@ until [[ $((nt + limit)) -gt ${dbcount} ]]; do
#do #do
#printf " " #printf " "
#done #done
for space in $(seq 1 "${COLUMNS}") for space in $(seq 1 "${COLUMNS}"); do
do
printf "\b" printf "\b"
done done
done < <(echo "${dbid}") done < <(echo "${dbid}")

View file

@ -12,7 +12,7 @@ loop() {
ky=$(echo "${y}" | sed -e "s/${folderescaped}/https:\/\/${url}/g" -e "s/-[0-9]*\..*\$//g") ky=$(echo "${y}" | sed -e "s/${folderescaped}/https:\/\/${url}/g" -e "s/-[0-9]*\..*\$//g")
f=$(mariadb "${db}" -N -B -q -e "select photo from contact where photo like '${ky}%' limit 1") f=$(mariadb "${db}" -N -B -q -e "select photo from contact where photo like '${ky}%' limit 1")
if [[ $? -eq 0 && -z ${f} && -f ${y} ]]; then if [[ $? -eq 0 && -z ${f} && -f ${y} ]]; then
( ls -lh "${y}" && rm -rf "${y}" ) & (ls -lh "${y}" && rm -rf "${y}") &
if [[ $(jobs -r -p | wc -l) -ge $(($(getconf _NPROCESSORS_ONLN) * 2)) ]]; then if [[ $(jobs -r -p | wc -l) -ge $(($(getconf _NPROCESSORS_ONLN) * 2)) ]]; then
wait -n wait -n
fi fi