#!/bin/bash
#
# a script to open docs in HTML,
# checks if they are installed first.
#
# takes the html file (assumes "index.html") as
# the lone passed variable ($1) and checks if it exists,
# then goes from there...
# c2007 by Paul Sherman <psherma1@rochester.rr.com> http://www.pcbypaul.com     #
#									        #
# This program is free software; you can redistribute it and/or			#
# modify it under the terms of the GNU General Public License			#
# as published by the Free Software Foundation; either version 2		#
# of the License, or (at your option) any later version.
#
if [ -f "/usr/doc/$1/index.html" ]; then
	runBrowser "/usr/doc/$1/index.html" &
else
	DIALOG=Xdialog
	$DIALOG   --rc-file /usr/share/pixmaps/colorboxDOH.rc  --icon /usr/share/pixmaps/doh.xpm  --title "DOH!" \
		--msgbox "\nThe documentation for \"$1\" \ndoes not apear to be in your doc folder.\n\n \
		          This is part of the \"Extended_Docs\" package\navailable on the Absolute Slackware Extras CD\n" 0 0
	exit
fi

exit 0
