]>
git.ipfire.org Git - thirdparty/cups.git/blob - test/waitjobs.sh
dee7b1b9b7c7f1694d78d41a18dd264268ed15b3
3 # Script to wait for jobs to complete.
5 # Copyright 2008-2009 by Apple Inc.
7 # These coded instructions, statements, and computer programs are the
8 # property of Apple Inc. and are protected by Federal copyright
9 # law. Distribution and use rights are outlined in the file "LICENSE.txt"
10 # which should have been included with this file. If this file is
11 # file is missing or damaged, see the license at "http://www.cups.org/".
15 # Get timeout from command-line
25 # Figure out the proper echo options...
28 if (echo "testing\c"; echo 1,2,3) |
grep c
>/dev
/null
; then
36 echo $ac_n "Waiting for jobs to complete...$ac_c"
39 while test $timeout -gt 0; do
40 jobs=`../systemv/lpstat 2>/dev/null | wc -l | tr -d ' '`
41 if test $jobs = 0; then
45 if test $jobs != $oldjobs; then
46 echo $ac_n "$jobs...$ac_c"
51 timeout
=`expr $timeout - 5`