This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [??] can't get scripts to work!


Thanks very much for your help.  build-guile seems to work nicely
now. :-)

I wonder why I haven't been bitten by this before?  I guess I can't
have been using many guile script up to now.

Guile Developers, shouldn't "configure" auto detect this, so that
"build-guile" is  set up appropriately?

>>>>> "Gord" == Gordon Matzigkeit <gord@trick.fig.org> writes:

>>>>> Jens-Ulrik Petersen writes:

    juhp> I can't get guile scripts to run!

    juhp> #!/home/petersen/mount/solaris/bin/guile -s

    Gord> Your script is being interpreted by /bin/sh.  Some operating
    Gord> systems have a limitation on how big the #! line can be
    Gord> (usually 32 characters).

    Gord> Here's the magic you want:

    Gord> #!/home/petersen/mount/solaris/bin/guile -s
    Gord> exec /home/petersen/mount/solaris/bin/guile -s "$0" ${1+"$@"}
    Gord> exit 1
    Gord> !#

I have a couple of questions about that.  Since they are probably
obvious to most people here, if you have time you may prefer to answer 
them privately.

Why ${1+"$@"}?  Is "$@" not good enough?

Why is the "exit 1" necessary?

-- 
Jens-Ulrik Holger Petersen  <http://www.kurims.kyoto-u.ac.jp/~petersen/>
Research Institute for Mathematical Sciences, Kyoto University