source: trunk/athena/bin/athrun/gathrun @ 26017

Revision 26017, 917 bytes checked in by achernya, 11 years ago (diff)
In athrun: * Install compatibility symlinks in attachandrun so it also appears in /bin * Stop using a fully-qualified path to attachandrun in athrun and gathrun
  • Property svn:executable set to *
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
7splash=no
8if [ "$1" = "--splash" ]; then
9  shift
10  splash=yes
11fi
12
13# Set sane values
14export ATHENA_SYS=${ATHENA_SYS:-$(machtype -S)}
15export ATHENA_SYS_COMPAT=${ATHENA_SYS_COMPAT:-$(machtype -C)}
16
17case $# in
180)
19  echo "Usage: gathrun locker [program [args ...]]" >&2
20  exit 1
21  ;;
221)
23  locker=$1
24  program=$1
25  shift
26  ;;
27*)
28  locker=$1
29  program=$2
30  shift 2
31  ;;
32esac
33
34if 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 attachandrun "$locker" "$program" "$program" "$@"
39else
40  zenity --info \
41    --text="$program is not available in the $locker locker on this platform."
42fi
Note: See TracBrowser for help on using the repository browser.