diff options
Diffstat (limited to 'scripts/browser')
-rw-r--r-- | scripts/browser/Makefile.am | 6 | ||||
-rwxr-xr-x | scripts/browser/kvi_run_netscape | 24 |
2 files changed, 30 insertions, 0 deletions
diff --git a/scripts/browser/Makefile.am b/scripts/browser/Makefile.am new file mode 100644 index 00000000..6e5f216a --- /dev/null +++ b/scripts/browser/Makefile.am @@ -0,0 +1,6 @@ +############################################################################### +# KVirc Makefile 08.12.98 Szymon Stefanek +############################################################################### +bin_SCRIPTS = kvi_run_netscape + +EXTRA_DIST= $(bin_SCRIPTS) 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 |