On Thu, May 10, 2007 at 01:12:53PM +0200, Paolo Bonzini wrote:
> 
> >>#! @bindir@/gst -qgf
> >>
> >>header to browser/Run.st and install it as gst-blox?
> >
> >Is there a new `-f' option in GNU Smalltalk? I can't find it, so I can't
> >check whether it would work.
> 
> It's been there since 2.3.

[...]

Right, sorry. `-f' option is available.

I can confirm that using the shebang above and copying browser/Run.st to
/usr/bin/gst-blox works.

> In practice, "-a" is almost never used in practice.  It is used 
> internally by Smalltalk images, which have "#! /usr/bin/env gst -aI" in 
> their first line.

It reminds me of a patch (attached) I apply to GNU Smalltalk for Debian
package because the shebang in the image does not work. I was told that
what is behind the shebang is passed as a single argument.

The following snippet illustrate this. On my Debian GNU/Linux box:

  [EMAIL PROTECTED] cat shebang1
  #! /bin/echo -e
  [EMAIL PROTECTED] ./shebang1
  ./shebang1
  [EMAIL PROTECTED] ./shebang1 whatever
  ./shebang1 whatever
  [EMAIL PROTECTED] cat shebang2
  #! /bin/echo -e whatever
  [EMAIL PROTECTED] ./shebang2
  -e whatever ./shebang2

That is, /bin/echo from shebang2 receives '-e whatever' as first argument.
Hence /usr/bin/env receives `gst -aI...' and fails. With the patch,
executing gst.im works.

The patch is crude because it hardcodes the path to gst, I guess it could be
modified to use @automake@ variable and work in all cases; but then we'll need
to check if dummy[64] is not exceeded.

Regards,

Thomas
--- smalltalk--debian--2.3.orig/libgst/save.c
+++ smalltalk--debian--2.3/libgst/save.c
@@ -93,7 +93,7 @@
 	global oop variable data
 	object data */
 
-#define EXECUTE      "#! /usr/bin/env gst -aI\nexec gst -I \"$0\" -a \"[EMAIL PROTECTED]"\n"
+#define EXECUTE      "#! /usr/bin/gst -aI\n"
 #define SIGNATURE    "GSTIm"
 
 typedef struct save_file_header
_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to