source: trunk/athena/bin/gathrun/gathrun.sh @ 25948

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
RevLine 
[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]7splash=no
8if [ "$1" = "--splash" ]; then
9  shift
10  splash=yes
11fi
12
[25708]13# Set sane values
14export ATHENA_SYS=${ATHENA_SYS:-$(machtype -S)}
15export ATHENA_SYS_COMPAT=${ATHENA_SYS_COMPAT:-$(machtype -C)}
16
[16178]17case $# in
180)
[20240]19  echo "Usage: gathrun locker [program [args ...]]" >&2
[16178]20  exit 1
21  ;;
221)
23  locker=$1
24  program=$1
[16239]25  shift
[16178]26  ;;
27*)
28  locker=$1
29  program=$2
30  shift 2
31  ;;
32esac
33
34if 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" "$@"
39else
[25948]40  zenity --info \
41    --text="$program is not available in the $locker locker on this platform."
[16178]42fi
Note: See TracBrowser for help on using the repository browser.