~ubuntu-branches/ubuntu/jaunty/usplash/jaunty

« back to all changes in this revision

Viewing changes to t.sh

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2009-03-09 15:12:58 UTC
  • Revision ID: james.westby@ubuntu.com-20090309151258-6ya2aztcc8vusox6
Tags: 0.5.31
{lib,}usplash.c: do not clear text area before doing input prompting.
If the text area is cleared, TEXT-URGENT information is wiped from
the screen before prompting.  Instead, correctly clear text area on
start-up regardless of verbosity level.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash
2
 
#
3
 
# Copyright © 2006 Dennis Kaarsemaker <dennis@kaarsemaker.net>
4
 
#
5
 
# This program is free software; you can redistribute it and/or modify
6
 
# it under the terms of the GNU General Public License as published by
7
 
# the Free Software Foundation; either version 2 of the License, or
8
 
# (at your option) any later version.
9
 
#
10
 
# This program is distributed in the hope that it will be useful,
11
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
# GNU General Public License for more details.
14
 
#
15
 
# You should have received a copy of the GNU General Public License
16
 
# along with this program; if not, write to the Free Software
17
 
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
18
 
 
19
 
set -e
20
 
 
21
 
while [ ! -z $1 ]; do
22
 
    case $1 in
23
 
        -v)
24
 
            VERBOSE=-v
25
 
            shift
26
 
            ;;
27
 
        -x)
28
 
            shift
29
 
            X="-x $1"
30
 
            shift
31
 
            ;;
32
 
        -y)
33
 
            shift
34
 
            Y="-y $1"
35
 
            shift
36
 
            ;;
37
 
        *)
38
 
            echo >&2 "Error: unknown argument $1"
39
 
            exit 1
40
 
            ;;
41
 
    esac
42
 
done
43
 
 
44
 
LD_LIBRARY_PATH=. ./usplash -c $X $Y $VERBOSE &
45
 
pid=$!
46
 
sleep 3
47
 
 
48
 
for i in `seq 5`; do
49
 
    usplash_write "TEXT loop iteration $i"
50
 
    usplash_write "SUCCESS ok"
51
 
    usplash_write "TEXT loop iteration $i"
52
 
    usplash_write "FAILURE fail"
53
 
    usplash_write "PROGRESS $((20*$i))"
54
 
    sleep 1
55
 
done
56
 
usplash_write "TEXT resetting"
57
 
sleep 1
58
 
usplash_write "CLEAR"
59
 
usplash_write "QUIT"