2008-09-16 00:20:33 -04:00
|
|
|
! Copyright (C) 2008 Eduardo Cavazos, Slava Pestov.
|
|
|
|
! See http://factorcode.org/license.txt for BSD license.
|
|
|
|
USING: kernel namespaces continuations debugger sequences fry
|
2008-11-08 19:29:05 -05:00
|
|
|
io.files io.launcher bootstrap.image qualified mason.common
|
2008-09-16 00:20:33 -04:00
|
|
|
mason.config ;
|
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 )
|
2008-11-08 19:29:05 -05:00
|
|
|
images [ boot-image-name ] map
|
2008-09-16 00:20:33 -04:00
|
|
|
{
|
|
|
|
"vm"
|
|
|
|
"temp"
|
|
|
|
"logs"
|
|
|
|
".git"
|
|
|
|
".gitignore"
|
|
|
|
"Makefile"
|
|
|
|
"unmaintained"
|
|
|
|
"unfinished"
|
|
|
|
"build-support"
|
2008-11-08 19:29:05 -05:00
|
|
|
}
|
|
|
|
append ;
|
2008-09-16 00:20:33 -04:00
|
|
|
|
|
|
|
: remove-common-files ( -- )
|
|
|
|
common-files [ delete-tree ] each ;
|
|
|
|
|
|
|
|
: remove-factor-app ( -- )
|
|
|
|
target-os get "macosx" =
|
2008-09-16 11:34:51 -04:00
|
|
|
[ "Factor.app" delete-tree ] unless ;
|
2008-09-16 00:20:33 -04:00
|
|
|
|
|
|
|
: tidy ( -- )
|
|
|
|
"factor" [ remove-factor-app remove-common-files ] with-directory ;
|