35 lines
926 B
Bash
Executable File
35 lines
926 B
Bash
Executable File
#!/bin/sh
|
|
BROWSER=netscape
|
|
URL=@prefix@/share/doc/bochs/DOC-linux.html
|
|
MY_PATH=@prefix@/bin/bochs-docs
|
|
|
|
cat <<EOF
|
|
-----------------------------------------------------
|
|
Viewing Bochs HTML documentation with $BROWSER
|
|
-----------------------------------------------------
|
|
EOF
|
|
|
|
if test "$BROWSER" = netscape; then
|
|
# first try to put the documentation into the currently running netscape.
|
|
$BROWSER -remote "openURL($URL)" >/dev/null 2>/dev/null
|
|
|
|
# if that succeeded, we're done
|
|
if test $? = 0; then
|
|
exit 0
|
|
fi
|
|
fi
|
|
|
|
# try starting a new browser instead
|
|
$BROWSER $URL
|
|
|
|
# nothing else to try, so if that failed print a decent error message
|
|
if test $? != 0; then
|
|
echo ERROR: Browser ended with an error code $?. This may mean that
|
|
echo the browser was not found in your PATH, or that the browser was
|
|
echo killed. To use a different browser, edit $MY_PATH
|
|
echo and change the BROWSER variable.
|
|
exit 1
|
|
fi
|
|
|
|
exit 0
|