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

Revision 20240, 561 bytes checked in by ghudson, 21 years ago (diff)
Fix usage message to indicate that args are only valid with program. Pass valid arguments to 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
7case $# in
80)
[20240]9  echo "Usage: gathrun locker [program [args ...]]" >&2
[16178]10  exit 1
11  ;;
121)
13  locker=$1
14  program=$1
[16239]15  shift
[16178]16  ;;
17*)
18  locker=$1
19  program=$2
20  shift 2
21  ;;
22esac
23
24if attachandrun --check "$locker" "$program" "$@"; then
25  exec /bin/athena/attachandrun "$locker" "$program" "$program" "$@"
26else
27  gdialog --msgbox \
[20240]28    "$program is not available in the $locker locker on this platform." 1 100
[16178]29fi
Note: See TracBrowser for help on using the repository browser.