pharo wrapper script suggestion and a question
what do you think about modifiying the wrapper script pharo.sh (OneClick edition) slightly in order to alleviate scripting: a) pharo.sh: passing "$@" over to pharo: ... exec "$BASE/pharo" \ ... ... "$ROOT/Contents/Resources/pharo.image" \ "$@" b) making a second script, pharo-headless.sh: ... exec "$BASE/pharo" \ -headless \ ... ... "$ROOT/Contents/Resources/pharo.image" \ "$@" Test: pharo-headless anyScript.st And another Question: is there a better way of forcing "pharo -headless" to quit, better than writing "WorldState quitSession." in every script ? -- View this message in context: http://forum.world.st/pharo-wrapper-script-suggestion-and-a-question-tp40993... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
On 23 Nov 2011, at 12:39, t olschewski wrote:
what do you think about modifiying the wrapper script pharo.sh (OneClick edition) slightly in order to alleviate scripting:
a) pharo.sh: passing "$@" over to pharo:
... exec "$BASE/pharo" \ ... ... "$ROOT/Contents/Resources/pharo.image" \ "$@"
Yes, that might be useful.
b) making a second script, pharo-headless.sh:
... exec "$BASE/pharo" \ -headless \ ... ... "$ROOT/Contents/Resources/pharo.image" \ "$@"
Test:
pharo-headless anyScript.st
Again, useful indeed. But the question remains if the one-click needs this: once you are working at that level, I would consider you an advanced user combining its own images and vm's. BTW, I always use -vm-display-null and -vm-sound-null, because -headless does not always work, I am not sure what the preferred/official way is.
And another Question:
is there a better way of forcing "pharo -headless" to quit, better than writing "WorldState quitSession." in every script ?
To start a server, it is more handy that there is no automatic quit. But for simple scripting thus is annoying, yes, Sven
Sven Van Caekenberghe wrote
But the question remains if the one-click needs this: once you are working at that level, I would consider you an advanced user combining its own images and vm's.
it's not that high a hurdle or no hurdle at all to people already using pharo, agreed. But maybe to an unknown number of python-, ruby-, tcl-, scheme- etc. -users principally interested in trying smalltalk, expecting that running a script should be as easy as python foo.py, ruby foo.rb, tcl foo.tcl. As should be accessing stdin/out and command line arguments. -- View this message in context: http://forum.world.st/pharo-wrapper-script-suggestion-and-a-question-tp40993... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
participants (2)
-
Sven Van Caekenberghe -
t olschewski