Re: [Pharo-users] Execute a script from command line save image and exit

2016-11-28 Thread Dimitris Chloupis
On Mon, Nov 28, 2016 at 3:43 PM Thierry Goubier wrote: > > if the code is passed as eval it works fine. I assume here is because ! is > used to define metadata inside a st file. > > > Yes, I'd guess that you are triggering the !! delimited reading when you > give a .st. In short, giving a .st fil

Re: [Pharo-users] Execute a script from command line save image and exit

2016-11-28 Thread Sven Van Caekenberghe
> On 28 Nov 2016, at 15:08, Damien Pollet wrote: > > So… if I read that code correctly, when you pass both --save and --quit, the > image will first save itself and quit (with an unspecified return code, or > the one picked by the snapshot code). Then, next time you run this image, it > will

Re: [Pharo-users] Execute a script from command line save image and exit

2016-11-28 Thread Damien Pollet
So… if I read that code correctly, when you pass both --save and --quit, the image will first save itself and quit (with an unspecified return code, or the one picked by the snapshot code). Then, next time you run this image, it will resume execution and exit immediately (that time with an explicit

Re: [Pharo-users] Execute a script from command line save image and exit

2016-11-28 Thread Thierry Goubier
2016-11-28 14:28 GMT+01:00 Dimitris Chloupis : > > > On Mon, Nov 28, 2016 at 2:13 PM Thierry Goubier > wrote: > >> The GitFileTree-MergeDriver is a good place for that since it has a >> Makefile[1] with smalltalk scripting inside ("eval"), and a command line >> handler[2] to handle being used on

Re: [Pharo-users] Execute a script from command line save image and exit

2016-11-28 Thread Dimitris Chloupis
On Mon, Nov 28, 2016 at 2:13 PM Thierry Goubier wrote: > The GitFileTree-MergeDriver is a good place for that since it has a > Makefile[1] with smalltalk scripting inside ("eval"), and a command line > handler[2] to handle being used on the command line[3] by git. > > yeah problem is eval works f

Re: [Pharo-users] Execute a script from command line save image and exit

2016-11-28 Thread p...@highoctane.be
I have been doing like this: #!/bin/bash ./pharo Pharo.image save Builder ./pharo Builder.image LoadBuilder.st --quit and LoadBuilder.st contains Smalltalk saveSession. Worked for me in a 3.0, so should still be fine. I could then to a set of images with various names and builders so one coul

Re: [Pharo-users] Execute a script from command line save image and exit

2016-11-28 Thread Sven Van Caekenberghe
Hi Dimitris, According to STCommandLineHandler>>#end | quit | quit := self commandLine hasOption: 'quit'. (self commandLine hasOption: 'save') ifTrue: [ Smalltalk snapshot: true andQuit: quit ]. quit ifTr

Re: [Pharo-users] Execute a script from command line save image and exit

2016-11-28 Thread Thierry Goubier
The GitFileTree-MergeDriver is a good place for that since it has a Makefile[1] with smalltalk scripting inside ("eval"), and a command line handler[2] to handle being used on the command line[3] by git. [1] https://github.com/ThierryGoubier/GitFileTree-MergeDriver/blob/master/Makefile [2] https:/

Re: [Pharo-users] Execute a script from command line save image and exit

2016-11-28 Thread Dimitris Chloupis
can you provide a link to your makefile, maybe I do something stupid, I am very noob when it comes to command line cause I use GUIs 99% of the time On Mon, Nov 28, 2016 at 1:59 PM Thierry Goubier wrote: > 2016-11-28 12:54 GMT+01:00 Dimitris Chloupis : > > there are two binaries one is pharo-ui

Re: [Pharo-users] Execute a script from command line save image and exit

2016-11-28 Thread Thierry Goubier
2016-11-28 12:54 GMT+01:00 Dimitris Chloupis : > there are two binaries one is pharo-ui that displays the gui and one is > pharo that does not use the GUI , because I use pharo and not pharo-ui , i > do not need -vm-display-null and does not solve my problem of not exiting > Then this is strange

Re: [Pharo-users] Execute a script from command line save image and exit

2016-11-28 Thread Dimitris Chloupis
there are two binaries one is pharo-ui that displays the gui and one is pharo that does not use the GUI , because I use pharo and not pharo-ui , i do not need -vm-display-null and does not solve my problem of not exiting On Mon, Nov 28, 2016 at 1:25 PM Thierry Goubier wrote: > 2016-11-28 12:13

Re: [Pharo-users] Execute a script from command line save image and exit

2016-11-28 Thread Thierry Goubier
2016-11-28 12:13 GMT+01:00 Dimitris Chloupis : > How to execute a script from command line , then save the image and exit ? > > I use the st command but it offers either --save which saves but keeps > image opened or --exit the exits the image without saving > > ./pharo Ephestos.image st --save t

[Pharo-users] Execute a script from command line save image and exit

2016-11-28 Thread Dimitris Chloupis
How to execute a script from command line , then save the image and exit ? I use the st command but it offers either --save which saves but keeps image opened or --exit the exits the image without saving ./pharo Ephestos.image st --save test.st