[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: How do I reference a shell variable from guile script?



On Apr 7, 2010, at 11:49 AM, Dave N6NZ wrote:

> Suppose I want to build a path like: $HOME/<path>/gedasymbols to pick up component libraries, without unrolling $HOME into a hard path in a (define..) -- how do I get guile to pick up the value of $HOME from the shell, and then get it pasted into the rest of the stuff?

Use ${HOME}. Here's a related (working) example from one of my projects:

(component-library "${EDCCD_DEV}/hardware/symbols/EDCCD")

EDCCD_DEV is an environment variable.

> I'm aiming for:
> (define gedasymbols <path built off $HOME>)
> (component-library (build-path gedasymbols "foo"))

I'm not sure where the expansion occurs. It may be necessary to put the variable into the string arg for component-library.

John Doty              Noqsi Aerospace, Ltd.
http://www.noqsi.com/
jpd@xxxxxxxxx




_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user