mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
40 lines
483 B
Bash
Executable file
40 lines
483 B
Bash
Executable file
#!/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)'
|
|
;;
|
|
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
|
|
|