[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] gst & scripting
From: |
Paolo Bonzini |
Subject: |
Re: [Help-smalltalk] gst & scripting |
Date: |
Tue, 09 Dec 2008 13:39:37 +0100 |
User-agent: |
Thunderbird 2.0.0.18 (Macintosh/20081105) |
Damien Pollet wrote:
> I just tested with #!/usr/bin/env gst and #!/opt/local/bin/gst
>
> It works fine with both, except the latter is specific to my
> installation (macports).
It should be
#! /usr/bin/env gst -f
to pass command-line arguments and shut up the garbage collection
message. However, passing more than one argument on the #! lines is not
portable. It would work instead to use
#! /path/to/gst -f
but as you said it is not portable.
So that's why someone (not me, I don't remember who it was) concocted...
>> #! /bin/sh
>> "exec" "gst" "-f" "$0" "$@"
... this one, which is actually quite elegant. It is similar to how Tcl
scripts are invoked with
#! /bin/sh
# Tcl sees the next line as a continuation of the comment \
exec wish "$0" "$@"
Paolo