[OS X TeX] kpsewhich pointing to wrong location?

Maarten Sneep maarten.sneep at xs4all.nl
Sat Jan 20 04:57:19 EST 2007


On Jan 20, 2007, at 10:30, Peter Dyballa wrote:

>
> Am 20.01.2007 um 02:29 schrieb Nathan Paxton:
>
>> When I type "locate kpsewhich" I get:
>> nathanpaxton$ locate kpsewhich
>> /usr/local/teTeX/bin/i386-apple-darwin8.6.1/kpsewhich
>> /usr/local/teTeX/bin/powerpc-apple-darwin7.9.0/kpsewhich
>> /usr/local/teTeX/man/man1/kpsewhich.1
>> /usr/local/TeXLive/bin/powerpc-apple-darwin7.9.0/kpsewhich
>> /usr/local/TeXLive/man/man1/kpsewhich.1
>> /usr/local/TeXLive/texmf.texlive/doc/man/man1/kpsewhich.1
>
> Instead of simply invoking locate, you could make it a filter that  
> either rejects or keeps a particular string.
>
> Example one: locate kpsewhich | grep -v teTeX
>
> Example two: locate kpsewhich | grep TeXLive
>
>
> And of course you can create a shell function or a shell alias to  
> ease this!

I would not use locate for this purpose at all: the locate database  
is updated by periodic weekly (I think), which runs at 4 in the  
morning, if the computer is running (i.e. not asleep or off) at that  
time. Therefore most machines have a terribly out of date locate  
database, and the results can not be trusted, especially when you  
want to automate this for a variety of systems, TextMate probably  
wants to support *any* available text system.

The appropriate approach is to use a) a preference for setting the  
TeX binaries path (which is used by almost all GUI fontends) or b)  
run /all/ shell initialization scripts and get the path correctly  
from those.

Of course, with /usr/texbin now becoming the preferred standard, no  
matter which tex you have, this problem will become moot in the not  
too distant future (hey, I can always dream).

If you want an up to date locate (and have other maintenance done  
that is normally performed in the middle of the night), you can run  
sudo periodic daily; sudo periodic weekly; sudo periodic monthly. The  
weekly does locate. There is a GUI for this called Janitor.

HTMH,

Maarten

------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/





More information about the MacOSX-TeX mailing list