> On 23 Oct 2014, at 21:17, Esteban Lorenzano <esteba...@gmail.com> wrote: > > $ cat startserver.sh > #! /bin/sh > nohup ./pharo Pharo.image eval —no-quit “MyServerStart port: $1” & > > ./startserver 8080 > ./startserver 8081 > ./startserver 8082 > > but is a bit… “trucho” (in plain argentinian)… which means a bad quality hack > :P
No, I actually like it: it is explicit and simple to understand. Clean. If you think that is a ugly hack, I would not dare to ask what your opinion is of *any* shell script ;-) - and any Unix like system that we trust our daily computing to is full of those ! >> On 23 Oct 2014, at 21:08, Sven Van Caekenberghe <s...@stfx.eu> wrote: >> >> Nah, you can do it way easier: >> >> $ cat run.st >> NonInteractiveTranscript stdout install. >> >> Transcript show: Smalltalk commandLine arguments; cr. >> >> Smalltalk quitPrimitive. >> >> $ ./pharo Pharo.image run.st 1 2 3 >> #('1' '2' '3') >> >> HTH, >> >> Sven >> >>> On 23 Oct 2014, at 20:52, Esteban A. Maringolo <emaring...@gmail.com> wrote: >>> >>> 2014-10-23 15:19 GMT-03:00 Esteban Lorenzano <esteba...@gmail.com>: >>>> >>>>> On 23 Oct 2014, at 20:16, Esteban A. Maringolo <emaring...@gmail.com> >>>>> wrote: >>>>> Do I have to define a subclass of STCommandLineHandler? >>>> yes >>> >>> I thought so. >>> >>>>> How can I capture the --port argument? For what I saw, only "boolean" >>>>> parameters can be defined (--quit, --save, etc, without arguments). It >>>>> is, no getopts compatibility. >>>> no idea… we can work on that… is necessary :) >>> >>> The VM itself has its own command parameters, are the parameters >>> handled and/or passed to the image? If so, how? >>> >>> Regards! >>> >> >> > >