File: kvi_run_netscape

package info (click to toggle)
kvirc 2%3A3.2.4-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 38,312 kB
  • ctags: 34,689
  • sloc: cpp: 179,604; sh: 17,279; makefile: 2,329; perl: 2,009; ansic: 541; pascal: 351
file content (24 lines) | stat: -rwxr-xr-x 454 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
#! /bin/sh

set -e

BROWSER=

if [ -z "$1" ]; then
	echo "Missing URL"
else
	for BROWSER in firefox seamonkey mozilla netscape ""; do
		if [ -z "$BROWSER" ]; then 
			echo "Could not find either Netscape or Mozilla"
			exit 0
		fi
		if which "$BROWSER" > /dev/null; then
			break;
		fi
	done
		
	if ! "$BROWSER" -remote "openURL($1)" 2> /dev/null; then
		echo "$BROWSER is not currently running. Starting a new instance..."
		exec "$BROWSER" "$1"
	fi
fi