]> gitweb.factorcode.org Git - factor.git/blob - extra/mason/cleanup/cleanup.factor
Merge branch 'master' into experimental
[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: arrays continuations io.directories
4 io.directories.hierarchy io.files io.launcher kernel
5 mason.common mason.config mason.platform namespaces ;
6 IN: mason.cleanup
7
8 : compress-image ( -- )
9     "bzip2" boot-image-name 2array try-process ;
10
11 : compress-test-log ( -- )
12     "test-log" exists? [
13         { "bzip2" "test-log" } try-process
14     ] when ;
15
16 : cleanup ( -- )
17     builder-debug get [
18         build-dir [
19             compress-image
20             compress-test-log
21             "factor" delete-tree
22         ] with-directory
23     ] unless ;