forked from mit-athena/athrun
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gathrun
executable file
·42 lines (37 loc) · 917 Bytes
/
gathrun
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/sh
# $Id: gathrun.sh,v 1.3 2004-03-06 17:18:57 ghudson Exp $
# gathrun - Run a program, or put up an error dialog saying that it
# doesn't exist.
splash=no
if [ "$1" = "--splash" ]; then
shift
splash=yes
fi
# Set sane values
export ATHENA_SYS=${ATHENA_SYS:-$(machtype -S)}
export ATHENA_SYS_COMPAT=${ATHENA_SYS_COMPAT:-$(machtype -C)}
case $# in
0)
echo "Usage: gathrun locker [program [args ...]]" >&2
exit 1
;;
1)
locker=$1
program=$1
shift
;;
*)
locker=$1
program=$2
shift 2
;;
esac
if attachandrun --check "$locker" "$program" "$@"; then
if [ "$splash" = "yes" ]; then
yes | zenity --progress --text="Launching $program, please wait.\n(This may take a few moments)" --pulsate --no-cancel --timeout 7 &
fi
exec attachandrun "$locker" "$program" "$program" "$@"
else
zenity --info \
--text="$program is not available in the $locker locker on this platform."
fi