]> gitweb.factorcode.org Git - factor.git/blob - basis/tools/deploy/unix/unix.factor
f88cf06ef7fc8f48127b4e7875bfdad2f259c52a
[factor.git] / basis / tools / deploy / unix / unix.factor
1 ! Copyright (C) 2008 James Cash
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: io io.pathnames io.directories io.files
4 io.files.info.unix io.backend kernel namespaces make sequences
5 system tools.deploy.backend tools.deploy.config
6 tools.deploy.config.editor assocs hashtables prettyprint ;
7 IN: tools.deploy.unix
8
9 : create-app-dir ( vocab bundle-name -- vm )
10     dup "" copy-theme
11     copy-vm
12     dup OCT: 755 set-file-permissions ;
13
14 : bundle-name ( -- str )
15     deploy-name get ;
16
17 M: unix deploy* ( vocab -- )
18     "." resource-path [
19         dup deploy-config [
20             [ bundle-name create-app-dir ] keep
21             [ bundle-name image-name ] keep
22             namespace make-deploy-image
23             bundle-name normalize-path [ "Binary deployed to " % % "." % ] "" make print
24         ] bind
25     ] with-directory ;