use actual cpu count

This commit is contained in:
c0dev0id 2023-01-05 11:56:22 +01:00
parent facb11a58f
commit d52a5075a8

View File

@ -4,6 +4,7 @@
DIR="$(basename "$PWD")"
TITLE="$(basename "$PWD" |sed 's/unlisted-//g' | cut -d"_" -f2- | tr '-' ' ')"
PROCS="$(sysctl -n hw.ncpuonline)"
mkdir -p thm mid
@ -70,7 +71,7 @@ do
echo "</tr><tr>"
fi
while [ $(pgrep convert | wc -l) -ge 15 ]
while [ $(pgrep convert | wc -l) -gt $PROCS ]
do sleep 0.3; done
done