nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] Getting the location of the of the nmh executables from a script

2015-01-27 12:14:28
norm(_at_)dad(_dot_)org writes:
Again, I
could search $PATH for a component containing "/nmh.", but how do I know that
in the future there won't be more than one such component, or that in the
future there will be any such component?

It shouldn't matter if there is more than one; the first one found in the
$PATH would be used by the system, and that would be the one you should use
as well, for consistency.  And if there isn't any, then your script should
notice that and respond to it gracefully.

If you're going to do this for a machine that is solely used by you,
then you can do what I did, and always install nmh in its own directory
such as /usr/local/nmh13 /usr/local/nmh16 , and always point a soft-link
/usr/local/nmh at the current one.  That way I always know that my NMH
programs are in /usr/local/nmh/bin/ ,  and I can switch back and forth
between versions if I'm testing or debugging.  But when I run my
/usr/local/bin/repl , it knows that the "real" repl is always in
/usr/local/nmh/bin/repl .

All that depends on how I will
configure nmh in the future.

If you're doing it for you, then you should know what you plan to do,
and you should know what you did next time you configure nmh.

--hymie!    http://lactose.homelinux.net/~hymie    
hymie(_at_)lactose(_dot_)homelinux(_dot_)net
-------------------------------------------------------------------------------

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>