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
|
Rev | Line | |
---|
[16178] | 1 | #!/bin/sh |
---|
[20240] | 2 | # $Id: gathrun.sh,v 1.3 2004-03-06 17:18:57 ghudson Exp $ |
---|
[16178] | 3 | |
---|
| 4 | # gathrun - Run a program, or put up an error dialog saying that it |
---|
| 5 | # doesn't exist. |
---|
| 6 | |
---|
[25948] | 7 | splash=no |
---|
| 8 | if [ "$1" = "--splash" ]; then |
---|
| 9 | shift |
---|
| 10 | splash=yes |
---|
| 11 | fi |
---|
| 12 | |
---|
[25708] | 13 | # Set sane values |
---|
| 14 | export ATHENA_SYS=${ATHENA_SYS:-$(machtype -S)} |
---|
| 15 | export ATHENA_SYS_COMPAT=${ATHENA_SYS_COMPAT:-$(machtype -C)} |
---|
| 16 | |
---|
[16178] | 17 | case $# in |
---|
| 18 | 0) |
---|
[20240] | 19 | echo "Usage: gathrun locker [program [args ...]]" >&2 |
---|
[16178] | 20 | exit 1 |
---|
| 21 | ;; |
---|
| 22 | 1) |
---|
| 23 | locker=$1 |
---|
| 24 | program=$1 |
---|
[16239] | 25 | shift |
---|
[16178] | 26 | ;; |
---|
| 27 | *) |
---|
| 28 | locker=$1 |
---|
| 29 | program=$2 |
---|
| 30 | shift 2 |
---|
| 31 | ;; |
---|
| 32 | esac |
---|
| 33 | |
---|
| 34 | if attachandrun --check "$locker" "$program" "$@"; then |
---|
[25948] | 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 |
---|
[16178] | 38 | exec /bin/athena/attachandrun "$locker" "$program" "$program" "$@" |
---|
| 39 | else |
---|
[25948] | 40 | zenity --info \ |
---|
| 41 | --text="$program is not available in the $locker locker on this platform." |
---|
[16178] | 42 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.