File: siaghelp

package info (click to toggle)
siag 3.5.1-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 8,076 kB
  • ctags: 8,908
  • sloc: ansic: 67,975; lisp: 5,435; sh: 3,342; cs: 679; makefile: 550; perl: 404
file content (40 lines) | stat: -rwxr-xr-x 814 bytes parent folder | download
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
#!/bin/sh

# A script to use Netscape as help browser
# Netscape can't be used directly, as it behaves differently depending
# on whether an instance of Netscape is already running.
# Put this script in a directory in your PATH. Then do:
# SIAGHELP=siaghelp; export SIAGHELP

if [ "$SIAGHELP" = "siaghelp" ]; then
	unset SIAGHELP
fi

WS=`which "$SIAGHELP" 2> /dev/null`

if [ "$SIAGHELP" = "" -o ! -x "$WS" ]; then
	if which netscape > /dev/null; then
		SIAGHELP=netscape
	elif which lynx > /dev/null; then
		SIAGHELP="xterm -e lynx"
	else
		SIAGHELP=pw
	fi
fi

if [ "$SIAGHELP" = "kdehelp" ]; then
	case "$1" in
	*.htm* | *.HTM* )
		kdehelp "$1"
		;;
	* )
		kedit "$1"
		;;
	esac
elif [ "$SIAGHELP" = "netscape" ]; then
	(netscape -remote openURL\($@\) || netscape $@) 2> /dev/null
else
	$SIAGHELP "$1"
fi 2>&1