]>
git.ipfire.org Git - thirdparty/cups.git/blob - test/waitjobs.sh
3 # Script to wait for jobs to complete.
5 # Copyright © 2008-2019 by Apple Inc.
7 # Licensed under Apache License v2.0. See the file "LICENSE" for more
12 # Get timeout from command-line
22 # Figure out the proper echo options...
25 if (echo "testing\c"; echo 1,2,3) |
grep c
>/dev
/null
; then
33 echo $ac_n "Waiting for jobs to complete...$ac_c"
36 while test $timeout -gt 0; do
37 jobs=`$runcups ../systemv/lpstat 2>/dev/null | wc -l | tr -d ' '`
38 if test $jobs = 0; then
42 if test $jobs != $oldjobs; then
43 echo $ac_n "$jobs...$ac_c"
48 timeout
=`expr $timeout - 5`