]> git.ipfire.org Git - thirdparty/cups.git/blame - test/waitjobs.sh
Remove generated file.
[thirdparty/cups.git] / test / waitjobs.sh
CommitLineData
839a51c8
MS
1#!/bin/sh
2#
3# "$Id$"
4#
5# Script to wait for jobs to complete.
6#
7# Copyright 2008 by Apple Inc.
8#
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/".
14#
15
16# Get timeout from command-line
17if test $# = 1; then
18 timeout=$1
19else
20 timeout=60
21fi
22
23echo "Waiting for jobs to complete..."
24
25while test $timeout -gt 0; do
26 jobs=`../systemv/lpstat 2>/dev/null`
27 if test "x$jobs" = "x"; then
28 break
29 fi
30
31 sleep 5
32 timeout=`expr $timeout - 5`
33done
34
35#
36# End of "$Id$".
37#