#!/bin/csh -f
#
# Simple script to check for the executability of vizpaint, and then run
# it or present an error dialog.
#
/usr/bsd/which vizpaint > /dev/null
if ( "$status" == "0" ) then
    vizpaint $*
else
	/usr/bsd/which paint > /dev/null
	if ( "$status" == "0" ) then
		paint $*
	else
	    aliasWarning -b "OK" -t "Error: Program Not Found" \
	    -s 'The VizPaint executable is not available. This means that' \
	    -s 'it is either not on your $path (use "echo $path" to check)' \
	    -s 'or that it has not been installed. Check that "vizpaint"' \
	    -s 'in /usr/aw/TVPn.m/bin/ is softlinked to an executable that' \
	    -s 'exists. If it is not there then install VizPaint from the' \
	    -s 'VizPaint software CD using the Installer program on the CD.' \
	    -s 'Contact Customer support if you continue to have problems. ' >/dev/null

	endif
endif
