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)
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
[25708]7# Set sane values
8export ATHENA_SYS=${ATHENA_SYS:-$(machtype -S)}
9export ATHENA_SYS_COMPAT=${ATHENA_SYS_COMPAT:-$(machtype -C)}
10
[16178]11case $# in
120)
[20240]13  echo "Usage: gathrun locker [program [args ...]]" >&2
[16178]14  exit 1
15  ;;
161)
17  locker=$1
18  program=$1
[16239]19  shift
[16178]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 \
[20240]32    "$program is not available in the $locker locker on this platform." 1 100
[16178]33fi
Note: See TracBrowser for help on using the repository browser.