2011-09-13 23:22:20 -04:00
|
|
|
! Copyright (C) 2008, 2011 Eduardo Cavazos, Slava Pestov.
|
2008-09-16 00:20:33 -04:00
|
|
|
! See http://factorcode.org/license.txt for BSD license.
|
2011-09-14 02:39:16 -04:00
|
|
|
USING: bootstrap.image io.directories io.directories.hierarchy
|
2016-03-14 22:31:27 -04:00
|
|
|
io.files kernel namespaces sequences system ;
|
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
|
|
|
|
|
2016-03-14 22:31:27 -04:00
|
|
|
CONSTANT: cleanup-list {
|
|
|
|
"vm"
|
|
|
|
"temp"
|
|
|
|
"logs"
|
|
|
|
".git"
|
|
|
|
".gitignore"
|
|
|
|
"GNUmakefile"
|
|
|
|
"Nmakefile"
|
|
|
|
"unmaintained"
|
2016-03-15 06:19:54 -04:00
|
|
|
"build.cmd"
|
|
|
|
"build.sh"
|
2016-03-14 22:31:27 -04:00
|
|
|
"build-support"
|
|
|
|
"images"
|
|
|
|
"factor.dll.exp"
|
|
|
|
"factor.dll.lib"
|
|
|
|
"factor.exp"
|
|
|
|
"factor.lib"
|
|
|
|
"libfactor-ffi-test.exp"
|
|
|
|
"libfactor-ffi-test.lib"
|
|
|
|
}
|
|
|
|
|
2010-05-04 18:21:12 -04:00
|
|
|
: useless-files ( -- seq )
|
2016-03-14 22:31:27 -04:00
|
|
|
cleanup-list image-names [ boot-image-name ] map append
|
2011-09-13 23:22:20 -04:00
|
|
|
target-os get macosx? [ "Factor.app" suffix ] unless ;
|
2008-09-16 00:20:33 -04:00
|
|
|
|
|
|
|
: tidy ( -- )
|
2010-05-04 18:21:12 -04:00
|
|
|
"factor" [
|
|
|
|
useless-files
|
|
|
|
[ exists? ] filter
|
2011-10-19 05:32:30 -04:00
|
|
|
[ delete-tree ] each
|
2010-05-04 18:21:12 -04:00
|
|
|
] with-directory ;
|