[Openmcl-devel] Openmcl script: Request for adding external sourcing of other shell scripts

Gary Byers gb at clozure.com
Fri Nov 19 11:45:36 PST 2004



On Fri, 19 Nov 2004, Pascal J.Bourguignon wrote:

> Frank Gönninger,  PRION Consulting Services AG writes:
> > I have to make sure that another shell script gets sourced from within the
> > openmcl script. This is due to the fact that the other script (it being part
> > of a library I have to load within OpenMCL: ImageMagick - but the same thing
> > is true for others as well) sets some environment variables that have to be
> > set when loading the external shared library (.dylib) (done via UFFI).
>
> This is usually done this way:
>
> cat > my-entry-point <<EOF
> #!/bin/bash
> . whatever-rc-file-i-must-source
> . some-more
> exec openmcl $@
> EOF
> chmod 755 my-entry-point
> ./my-entry-point
>
>


If CCL::SETENV was exported and documented (ahem), it might be simpler
to do this within lisp:

(progn
  (ccl::setenv "IMAGEMAGICK_ENV_VAR" "WHATEVER")
  (open-shared-library ...))

If it isn't practical/possible/desirable to do things this way, I tend
to agree that it's better to have the "openmcl" script focus on starting
openmcl; I think that it's hard to generalize the other ad-hoc things
that might need to be done




More information about the Openmcl-devel mailing list