Subject: Re: texinfo files
To: NetBSD-current Discussion List <>
From: Greg A. Woods <>
List: current-users
Date: 09/25/1998 22:18:18
[ On Fri, September 25, 1998 at 18:08:11 (-0700), Bill Studenmund wrote: ]
> Subject: Re: texinfo files
> I vote we just teach our texi2dvi to print this message. Because the path
> a user is running is ENTIRELY up to him or her, this system script would
> have to do some interesting gyrations to cover all the bases. Plus, I'd
> rather not have a "tex" in-tree if it's not a real TeX.

That's not a bad idea.  Texi2dvi is, after all, just a script.

A stub script for tex is trivial though (there aren't many bases to

#! /bin/sh
PATH=$(echo $PATH | sed "s~$(dirname $0):*~~")
( exec $(basename $0) ${1+$@} )
# XXX magic number "2" is what sh(1) gives on exec failure....
if [ $rc = 2 ] ; then
        cat 1>&2 <<'END_OF_MESSAGE'
You need to install TeX to typeset texinfo, LaTeX, and similar
forms of documents.   One way you can do this by downloading and
installing the teTeX package from the main NetBSD distribution
site.  Please read the file found at the following URL for
complete instructions:
        exit 1
exit $rc

This isn't as clean as I'd like, but any cleaner would require C (I
think).  Certainly C has better ways to detect the execvp(2) failure!  ;-)
(and the message should come from a catalogue based on $0....)

I've no problem at all with having a stub like this in the system since
it's easily removed or replaced, and it effectively disappears if the
user puts the real program elsewhere in their path.

> I like the message. :-)

(of course the packages/README file doesn't yet contain "full"
instructions on how to do much of anything, but that's a separate
problem!  :-)

							Greg A. Woods

+1 416 218-0098      VE3TCP      <>      <robohack!woods>
Planix, Inc. <>; Secrets of the Weird <>