PageRenderTime 61ms CodeModel.GetById 52ms app.highlight 5ms RepoModel.GetById 2ms app.codeStats 0ms

/extra/mason/cleanup/cleanup.factor

http://github.com/abeaumont/factor
Unknown | 24 lines | 20 code | 4 blank | 0 comment | 0 complexity | 410c82d0d1e64969a2511e4181779d2e MD5 | raw file
 1! Copyright (C) 2008 Eduardo Cavazos, Slava Pestov.
 2! See http://factorcode.org/license.txt for BSD license.
 3USING: arrays continuations io.directories
 4io.directories.hierarchy io.files io.launcher kernel
 5mason.common mason.config mason.platform namespaces ;
 6IN: mason.cleanup
 7
 8: compress ( filename -- )
 9    dup exists? [ "bzip2" swap 2array short-running-process ] [ drop ] if ;
10
11: compress-image ( -- )
12    boot-image-name compress ;
13
14: compress-test-log ( -- )
15    "test-log" compress ;
16
17: cleanup ( -- )
18    builder-debug get [
19        build-dir [
20            compress-image
21            compress-test-log
22            "factor" delete-tree
23        ] with-directory
24    ] unless ;