Running Squeak fro ma unix shell script file with #! squeak...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Running Squeak fro ma unix shell script file with #! squeak...

Chris Cunnington-4
> I'm sure I remember someone making this work but can't spot any info right
> now.
>
> One should be able to make it so that a .st file could be made executable,
> start it with something akin to
> #! squeak my.image
>

The man page describes that [1]. 

"  It is also possible to make 'self interpreting' scripts by adding an 'interpreter line' to the start of the script. The 'hello.sq' file could be changed to


#![bindir]/squeak --
Transcript cr; show: 'Hello, world'.

and then made executable with


chmod +x hello.sq

and then invoked by running the script file directly:


SQUEAK_IMAGE="foo.image"
export SQUEAK_IMAGE
./hello.sq”

Chris