#!/bin/sh
# pDirt Beta Man viewer
# 
# Reads .man files, with or without extention.
#
if [ -z $1 ]; then
   echo 'Viewer for Manual pages, part of pDirt distribution'
   echo '  Usage: VIEWMAN [filename(.man)]'
   exit
fi

if [ -f $1.man ]; then
   echo 'Loading '$1'.man. Please hold on for a minute.'
   groff -Tascii -man $1.man | col | less -s
elif [ -f $1 ]; then
   echo 'Loading '$1'. Please hold on for a minute.'
   groff -Tascii -man $1 | col | less -s
else
   echo 'Could not find '$1' or '$1'.man.'
fi
