Revision 25948,
929 bytes
checked in by jdreed, 11 years ago
(diff) |
In gathrun:
* Add support for a splash screen to gathrun (Trac: #1208)
* Switch to zenity from gdialog
|
Line | |
---|
1 | #!/bin/sh |
---|
2 | # $Id: gathrun.sh,v 1.3 2004-03-06 17:18:57 ghudson Exp $ |
---|
3 | |
---|
4 | # gathrun - Run a program, or put up an error dialog saying that it |
---|
5 | # doesn't exist. |
---|
6 | |
---|
7 | splash=no |
---|
8 | if [ "$1" = "--splash" ]; then |
---|
9 | shift |
---|
10 | splash=yes |
---|
11 | fi |
---|
12 | |
---|
13 | # Set sane values |
---|
14 | export ATHENA_SYS=${ATHENA_SYS:-$(machtype -S)} |
---|
15 | export ATHENA_SYS_COMPAT=${ATHENA_SYS_COMPAT:-$(machtype -C)} |
---|
16 | |
---|
17 | case $# in |
---|
18 | 0) |
---|
19 | echo "Usage: gathrun locker [program [args ...]]" >&2 |
---|
20 | exit 1 |
---|
21 | ;; |
---|
22 | 1) |
---|
23 | locker=$1 |
---|
24 | program=$1 |
---|
25 | shift |
---|
26 | ;; |
---|
27 | *) |
---|
28 | locker=$1 |
---|
29 | program=$2 |
---|
30 | shift 2 |
---|
31 | ;; |
---|
32 | esac |
---|
33 | |
---|
34 | if attachandrun --check "$locker" "$program" "$@"; then |
---|
35 | if [ "$splash" = "yes" ]; then |
---|
36 | yes | zenity --progress --text="Launching $program, please wait.\n(This may take a few moments)" --pulsate --no-cancel --timeout 7 & |
---|
37 | fi |
---|
38 | exec /bin/athena/attachandrun "$locker" "$program" "$program" "$@" |
---|
39 | else |
---|
40 | zenity --info \ |
---|
41 | --text="$program is not available in the $locker locker on this platform." |
---|
42 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.