]> gitweb.factorcode.org Git - factor.git/blob - extra/mason/cleanup/cleanup.factor
ae24f533d6384be3fa805e7fcd1ad0f8fa6fe312
[factor.git] / extra / mason / cleanup / cleanup.factor
1 ! Copyright (C) 2008 Eduardo Cavazos, Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: kernel namespaces arrays continuations io.files io.launcher
4 mason.common mason.platform mason.config ;
5 IN: mason.cleanup
6
7 : compress-image ( -- )
8     "bzip2" boot-image-name 2array try-process ;
9
10 : compress-test-log ( -- )
11     "test-log" exists? [
12         { "bzip2" "test-log" } try-process
13     ] when ;
14
15 : cleanup ( -- )
16     builder-debug get [
17         build-dir [
18             compress-image
19             compress-test-log
20             "factor" delete-tree
21         ] with-directory
22     ] unless ;