2008-04-11 14:38:47 -04:00
|
|
|
! Copyright (C) 2008 James Cash
|
|
|
|
! See http://factorcode.org/license.txt for BSD license.
|
2008-12-15 03:18:59 -05:00
|
|
|
USING: io io.pathnames io.directories io.files
|
|
|
|
io.files.info.unix io.backend kernel namespaces make sequences
|
|
|
|
system tools.deploy.backend tools.deploy.config
|
|
|
|
tools.deploy.config.editor assocs hashtables prettyprint ;
|
2008-04-20 01:49:42 -04:00
|
|
|
IN: tools.deploy.unix
|
2008-04-11 14:28:28 -04:00
|
|
|
|
2008-04-20 01:49:42 -04:00
|
|
|
: create-app-dir ( vocab bundle-name -- vm )
|
|
|
|
dup "" copy-fonts
|
2008-12-15 01:01:06 -05:00
|
|
|
"" copy-vm
|
|
|
|
dup OCT: 755 set-file-permissions ;
|
2008-04-20 01:49:42 -04:00
|
|
|
|
|
|
|
: bundle-name ( -- str )
|
|
|
|
deploy-name get ;
|
|
|
|
|
|
|
|
M: unix deploy* ( vocab -- )
|
|
|
|
"." resource-path [
|
|
|
|
dup deploy-config [
|
|
|
|
[ bundle-name create-app-dir ] keep
|
|
|
|
[ bundle-name image-name ] keep
|
|
|
|
namespace make-deploy-image
|
|
|
|
bundle-name normalize-path [ "Binary deployed to " % % "." % ] "" make print
|
|
|
|
] bind
|
|
|
|
] with-directory ;
|