summaryrefslogtreecommitdiffstats
path: root/scripts/browser/kvi_run_netscape
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/browser/kvi_run_netscape')
-rwxr-xr-xscripts/browser/kvi_run_netscape24
1 files changed, 24 insertions, 0 deletions
diff --git a/scripts/browser/kvi_run_netscape b/scripts/browser/kvi_run_netscape
new file mode 100755
index 00000000..4ee301a4
--- /dev/null
+++ b/scripts/browser/kvi_run_netscape
@@ -0,0 +1,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