#!/bin/sh
#
# This script is an example of how to call the appropriate viewer based upon
# the URL method
#
# Michael Elkins <me@cs.hmc.edu>
#
# Created: March 10, 1997
# Last Edited: May 22, 1997
#

url="$1"
method=`echo $1 | sed 's;\(^[^:]*\):.*;\1;'`

case $method in
	ftp)	ncftp "$url"
		;;

	mailto)	mutt `echo $url | sed 's;^[^:]*:\(.*\);\1;'`
		;;

	*)	if test x$DISPLAY = x; then
			lynx "$url"
		else
			netscape -remote "openURL($url)" || netscape "$url"
		fi
		;;
esac
