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

Revision 25708, 690 bytes checked in by jdreed, 12 years ago (diff)
In gathrun: * Ensure ATHENA_SYS and ATHENA_SYS_COMPAT are set (Trac: #1205)
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# Set sane values
8export ATHENA_SYS=${ATHENA_SYS:-$(machtype -S)}
9export ATHENA_SYS_COMPAT=${ATHENA_SYS_COMPAT:-$(machtype -C)}
10
11case $# in
120)
13  echo "Usage: gathrun locker [program [args ...]]" >&2
14  exit 1
15  ;;
161)
17  locker=$1
18  program=$1
19  shift
20  ;;
21*)
22  locker=$1
23  program=$2
24  shift 2
25  ;;
26esac
27
28if attachandrun --check "$locker" "$program" "$@"; then
29  exec /bin/athena/attachandrun "$locker" "$program" "$program" "$@"
30else
31  gdialog --msgbox \
32    "$program is not available in the $locker locker on this platform." 1 100
33fi
Note: See TracBrowser for help on using the repository browser.