2008-09-16 00:20:33 -04:00
|
|
|
! Copyright (C) 2008 Eduardo Cavazos, Slava Pestov.
|
|
|
|
! See http://factorcode.org/license.txt for BSD license.
|
2009-02-26 02:38:01 -05:00
|
|
|
USING: bootstrap.image continuations debugger fry io.directories
|
|
|
|
io.directories.hierarchy io.encodings.ascii io.files io.launcher
|
2008-12-17 19:10:01 -05:00
|
|
|
kernel mason.common namespaces sequences ;
|
2008-11-08 19:29:05 -05:00
|
|
|
FROM: mason.config => target-os ;
|
2008-09-16 00:20:33 -04:00
|
|
|
IN: mason.release.tidy
|
|
|
|
|
|
|
|
: common-files ( -- seq )
|
2009-02-26 02:38:01 -05:00
|
|
|
"build-support/cleanup" ascii file-lines
|
2008-11-08 19:29:05 -05:00
|
|
|
images [ boot-image-name ] map
|
|
|
|
append ;
|
2008-09-16 00:20:33 -04:00
|
|
|
|
|
|
|
: remove-common-files ( -- )
|
2009-04-13 20:03:17 -04:00
|
|
|
common-files [ really-delete-tree ] each ;
|
2008-09-16 00:20:33 -04:00
|
|
|
|
|
|
|
: remove-factor-app ( -- )
|
|
|
|
target-os get "macosx" =
|
2009-04-13 20:03:17 -04:00
|
|
|
[ "Factor.app" really-delete-tree ] unless ;
|
2008-09-16 00:20:33 -04:00
|
|
|
|
|
|
|
: tidy ( -- )
|
|
|
|
"factor" [ remove-factor-app remove-common-files ] with-directory ;
|