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