aboutsummaryrefslogtreecommitdiff
path: root/bin/web
blob: 6fe66f9625f78cc175c0563df047ace12cd4e150 (plain)
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
43
#!/bin/sh

plumb1()
{
	case $BROWSER in
	# Other browsers here
	# ...
	*opera*)
		$BROWSER -remote 'openURL('$i', new-page)'
		;;
	*firebird*)
		$BROWSER -remote 'openURL('$i', new-window)'
		;;
	*firefox*)
		$BROWSER -remote 'openURL('$i', new-tab)'
		;;
	*mozilla*)
		$BROWSER -remote 'openURL('$i', new-tab)'
		;;
	esac
}

if [ $# = 0 ]
then
	plumb1 about:blank
else
	for i
	do
		if [ -f "$i" ]
		then
			p=`pwd`
			i=`cleanname -d $p $i`
			i=file://$i
		fi
		plumb1 $i
	done
fi

case $BROWSER in
*opera*)
	$BROWSER -remote 'raise()'
esac