<commit_before>USING: io io.files io.backend kernel namespaces sequences
system tools.deploy.backend tools.deploy.config assocs
hashtables prettyprint ;
IN: tools.deploy.linux

: copy-vm ( executable bundle-name -- vm )
  prepend-path "" append
  vm over copy-file ;
  
: copy-fonts ( name -- )  
  "fonts/" resource-path swap copy-tree-into ;
  
: create-app-dir ( vocab bundle-name -- vm )  
  dup copy-fonts
  copy-vm ;
  
: image-name ( vocab bundle-name -- str )  
  prepend-path ".image" append ;
  
: bundle-name ( -- str )  
  deploy-name get ;

M: linux 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 write
     ] bind
   ] with-directory ;  <commit_msg>Minor change to linux deployment, print instead of write<commit_after>! Copyright (C) 2008 <NAME>
! See http://factorcode.org/license.txt for BSD license.
USING: io io.files io.backend kernel namespaces sequences
system tools.deploy.backend tools.deploy.config assocs
hashtables prettyprint ;
IN: tools.deploy.linux

: copy-vm ( executable bundle-name -- vm )
  prepend-path "" append
  vm over copy-file ;
  
: copy-fonts ( name -- )  
  "fonts/" resource-path swap copy-tree-into ;
  
: create-app-dir ( vocab bundle-name -- vm )  
  dup copy-fonts
  copy-vm ;
  
: image-name ( vocab bundle-name -- str )  
  prepend-path ".image" append ;
  
: bundle-name ( -- str )  
  deploy-name get ;

M: linux 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 ;  
{'fraction_non_alphanumeric': 0.12370062370062371, 'fraction_numerical': 0.002079002079002079, 'mean_word_length': 2.3653846153846154, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5612827', 'n_tokens_mistral': 625, 'n_tokens_neox': 593, 'n_words': 162}