]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/dialog/samples/infobox5
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / dialog / samples / infobox5
1 #! /bin/sh
2 # $Id: infobox5,v 1.7 2011/01/18 09:19:09 tom Exp $
3 # get rid of all flickering by constructing a script unroll the loop, leaving
4 # us in curses-mode until we're done counting.
5
6 . ./setup-vars
7
8 . ./setup-tempfile
9
10 left=10
11 unit="seconds"
12 last='\'
13
14 cat >>$tempfile <<EOF
15 $DIALOG $last
16 EOF
17
18 while test $left != 0
19 do
20
21 cat >>$tempfile <<EOF
22         --sleep 1 \
23         --begin 0 5 \
24         --title "INFO BOX" $* \
25         --infobox "Hi, this is an information box. It is
26 different from a message box: it will
27 not pause waiting for input after displaying
28 the message. The pause here is only introduced
29 by the sleep command within dialog.
30 You have $left $unit to read this..." 0 0 $last
31 EOF
32
33 left=`expr $left - 1`
34 test $left = 1 && unit="second"
35 done
36
37 echo >>$tempfile
38
39 . $tempfile