Squeak scripts in UNIX
Giovanni Corriga
giovanni at corriga.net
Tue Feb 13 18:19:45 UTC 2007
Il giorno mar, 13/02/2007 alle 12.04 -0500, Lex Spoon ha scritto:
> This requires two changes in the standard Squeak image to work.
>
> First, the above approach requires that the image allows files as
> arguments, not just URL's. I see no reason not to support both: if it
> starts with "[a-z]+:", then it's a URL, othrewise it's a file.
[SNIP]
> To implement #!...!# (or whatever else), the best solution forward
> appears to be to have the script-running code in the image strip off
> the header.
I worked on something like that at the last Camp Smalltalk in Prague.
Mine was just a hack of a couple of lines of code, but it worked pretty
well. The [a-z]+: change should be as easy as that.
> PS -- There was a time in history when image files were directly
> executable on Unix. The trick is simply to put a proper #! header on
> *image* files, and to make sure that the header is exactly 512 bytes.
> I don't know why that change got backed out. It was a simple
> implementation and was convenient for Unix-based Squeakers.
That was cool. I'd love to have that in again.
Giovanni
More information about the Squeak-dev
mailing list
|