home *** CD-ROM | disk | FTP | other *** search
- # roff by Brian E. Litzinger
- TROFF=eroff
- TMP=/tmp/roff$$
- for file in $*
- do
- case $file in
- -*)
- args="$args $file"
- ;;
- *)
- command_line="`head -1 $file`"
- b="`echo $command_line | cut -c1-8`"
- if [ "$b" != '\" exec ' ] ; then
- echo "$file not roff format file!"
- exit 2
- fi
- command="`echo $command_line | cut -c9- `"
- d="sed -e '1d' $file |"
- for i in $command ; do
- if [ "$i" = '$F' ] ; then
- true
- else
- if [ "$i" = "$TROFF" ] ; then
- d="$d $i $args"
- else
- d="$d $i"
- fi
- fi
- done
- #echo $d
- eval $d
- ;;
- esac
- done
-