read the -r param, it is needed here when only one thread is used...

explicitly state that bin/bash is needed, not 100% sure if it is
supposed to work if a plain sh is used...
This commit is contained in:
Nils Kneuper 2009-02-22 23:08:09 +00:00
parent d3c74f041e
commit f54d9ff134

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
#
# Script to strip ICC profiles from all png images and to recompress them
# afterwards via optipng and advdef
@ -191,7 +191,7 @@ echo "* compressing the files *"
echo "*************************"
for f in $filelist
do
while [ $(jobs -p | wc -l) -ge $max_number_threads ]
while [ $(jobs -pr | wc -l) -ge $max_number_threads ]
do
# max number of threads reached, wait for a quarter second...
sleep 0.25