r6474 - in trunk/BOOK: . general/prog introduction/welcome

DJ Lucas dj at linuxfromscratch.org
Sun Jan 28 10:55:45 PST 2007

Dan Nicholson wrote:
> Actually, the whole AUTO_CLASSPATHing stuff can be reduced to one loop.
> for dir in `find ${AUTO_CLASSPATH_DIR} -type d 2>/dev/null`; do
>     pathappend $dir CLASSPATH
> done
> ${AUTO_CLASSPATH_DIR} will always come first in the `find', too. It
> would be nice if we'd unset used variables when we're done, too.unset 

> --
> Dan
Thanks for the catch Dan. I don't use a profile.d directory at all, so 
redefining the path explicitly is not an issue for me, nor is script 
order.  Also, breaking it apart like that was to keep from putting an 
empty directory in the search path, which really doesn't hurt a thing.  
It really did seem logical at the time. ;-)  I'll use the loop you've 
posted above, so that it becomes:

pathprepend . CLASSPATH
for dir in `find ${AUTO_CLASSPATH_DIR} -type d 2>/dev/null`; do
    pathappend $dir CLASSPATH

Only change was to put the working directory at the front of the path.  
Look good to you?

-- DJ Lucas

This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

More information about the blfs-book mailing list