2001-05-22 20:10:07 +04:00
|
|
|
#!/bin/sh
|
|
|
|
BROWSER=netscape
|
2001-06-02 11:41:03 +04:00
|
|
|
URL=/usr/local/bochs/@VERSION@/DOC-linux.html
|
2001-05-22 20:10:07 +04:00
|
|
|
MY_PATH=/usr/local/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
|