Working on better POST and PUT requests
[factor/jcg.git] / extra / mason / cleanup / cleanup.factor
bloba2c087392a3aa5b698334587601cb4f0037456e8
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
8 : compress-image ( -- )
9     "bzip2" boot-image-name 2array try-process ;
11 : compress-test-log ( -- )
12     "test-log" exists? [
13         { "bzip2" "test-log" } try-process
14     ] when ;
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 ;