diff --git a/scripts/mkphotos.sh b/scripts/mkphotos.sh index 4b26895..28befc9 100644 --- a/scripts/mkphotos.sh +++ b/scripts/mkphotos.sh @@ -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 "" fi - while [ $(pgrep convert | wc -l) -ge 15 ] + while [ $(pgrep convert | wc -l) -gt $PROCS ] do sleep 0.3; done done