File: ion-runinxterm

package info (click to toggle)
ion 0.0.20020207-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,072 kB
  • ctags: 1,719
  • sloc: ansic: 15,757; makefile: 153; sh: 115
file content (30 lines) | stat: -rwxr-xr-x 370 bytes parent folder | download | duplicates (4)
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
#!/bin/sh

test "$XTERMCMD" || XTERMCMD="x-terminal-emulator"

if test $# -lt 1; then
	echo error
	exit 0
fi

if test "$1" = "--"; then
	shift
	eval "$@" || {
		echo "Press enter..."
		read nothing
	}
	exit
fi

if test "$1" = "-T"; then
	if test $# -lt 3; then
		echo error
		exit 0
	fi
	title="$2"
	shift 2
else
	title="$1"
fi

exec $XTERMCMD -T "$title" -e $0 -- "$@"