Squeak scripts in UNIX

Lex Spoon lex at lexspoon.org
Wed Feb 14 20:12:12 UTC 2007


Bert Freudenberg <bert at freudenbergs.de> writes:
> The harder part is that there is no concept of a current working
> directory in Squeak. To find the script, you need to convert a
> relative path to the absolute one using cwd. This can either be done
> in the shell script, or one could abuse the SecurityPlugin which
> listens to environment variables ... or extend the VM ... or use
> OSProcess ...

On Unix, "FileDirectory default" gives you the Unix cwd.  And at any
rate, this is the "default" directory, so it is at least a defensible
place to start if you are given a relative path.


That said, that's very interesting that using the absolute path works
already.  Maybe the easiest thing, then, is to come up with some
shell-script magic to rewrite $0 into an absolute path.  Do any Unix
hackers here know how to do that?

-Lex




More information about the Squeak-dev mailing list