2009-01-14 02:00:54 -05:00
|
|
|
USING: accessors arrays continuations io.directories io.files.info
|
2009-05-12 06:16:46 -04:00
|
|
|
io.files.temp io.launcher io.backend kernel layouts math sequences system
|
2009-01-14 02:00:54 -05:00
|
|
|
tools.deploy.backend tools.deploy.config.editor ;
|
|
|
|
IN: tools.deploy.test
|
|
|
|
|
|
|
|
: shake-and-bake ( vocab -- )
|
|
|
|
[ "test.image" temp-file delete-file ] ignore-errors
|
|
|
|
"resource:" [
|
|
|
|
[ vm "test.image" temp-file ] dip
|
|
|
|
dup deploy-config make-deploy-image
|
|
|
|
] with-directory ;
|
|
|
|
|
|
|
|
: small-enough? ( n -- ? )
|
2009-08-27 21:27:35 -04:00
|
|
|
[ "test.image" temp-file file-info size>> ]
|
|
|
|
[ cell 4 / * cpu ppc? [ 100000 + ] when ] bi*
|
|
|
|
<= ;
|
2009-01-14 02:00:54 -05:00
|
|
|
|
|
|
|
: run-temp-image ( -- )
|
2009-05-12 06:16:46 -04:00
|
|
|
os macosx?
|
|
|
|
"resource:Factor.app/Contents/MacOS/factor" normalize-path vm ?
|
|
|
|
"-i=" "test.image" temp-file append 2array try-output-process ;
|