remove '-r' option from the 'jobs' call...

...since at least Espreon has problems with it

reduce default number of threads to use to just one
This commit is contained in:
Nils Kneuper 2009-02-22 22:30:45 +00:00
parent ea56b8eb4d
commit 0a577fc163

View file

@ -30,7 +30,7 @@
current_file=""
# Default optimization process nice
opti_nice=19
max_number_threads=6
max_number_threads=1
total_original_size=0
total_savings_size=0
total_savings_filecount=0
@ -156,8 +156,8 @@ Switches:
--help / -h Displays this help text.
--threads Run script with <value> worker threads. If not specified,
6 threads are used by default.
--threads Run script with <value> worker threads. If not specified, only
one thread is used by default.
This tool requires OptiPNG (http://www.cs.toronto.edu/~cosmin/pngtech/optipng/),
Advdef (http://advancemame.sourceforge.net/comp-readme.html) and ImageMagick's
@ -191,7 +191,7 @@ echo "* compressing the files *"
echo "*************************"
for f in $filelist
do
while [ $(jobs -rp | wc -l) -ge $max_number_threads ]
while [ $(jobs -p | wc -l) -ge $max_number_threads ]
do
# max number of threads reached, wait for half a second...
sleep 0.5