File: xfterm4

package info (click to toggle)
xfce4-utils 4.6.2-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,308 kB
  • ctags: 224
  • sloc: sh: 10,593; xml: 1,457; ansic: 1,246; perl: 693; makefile: 281
file content (37 lines) | stat: -rwxr-xr-x 820 bytes parent folder | download | duplicates (2)
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
#!/bin/sh

if [ "$1" = "-e" ]; then
	shift
fi	

if [ -d "$*" ]; then
	cd "$*"
elif [ -f "$*" -a ! -x "$*" ]; then
	ESTRING="`which less`"
	MSTRING="$*"
elif [ "`echo $* | grep "http:/"`" -o "`echo $* | grep "ftp:"`" -a ! -x "$*" ]; then
	# This requires lynx or links. If you don't have it, don't drop URLs.
	if which lynx >/dev/null 2>&1; then
		ESTRING="`which lynx`"
	elif which links >/dev/null 2>&1; then
		ESTRING="`which links`"
	fi
	MSTRING="$*"
else
	if which pauseme >/dev/null 2>&1; then
		ESTRING="`which pauseme`"
		MSTRING="$*"
	else
		ESTRING="$@"
	fi
fi

if [ x"$ESTRING" = x"" ]; then
	exec exo-open --launch TerminalEmulator
elif [ x"$MSTRING" = x"" ]; then
	exec exo-open --launch TerminalEmulator $EXEC"$ESTRING"
else
	exec exo-open --launch TerminalEmulator $EXEC"$ESTRING" "$MSTRING"
fi

exit 0