You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
454 B
25 lines
454 B
#! /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
|