factor/extra/mason/release/tidy/tidy.factor

39 lines
897 B
Factor
Raw Normal View History

! 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.
USING: bootstrap.image io.directories io.directories.hierarchy
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
CONSTANT: cleanup-list {
"vm"
"temp"
"logs"
".git"
".gitignore"
"GNUmakefile"
"Nmakefile"
"unmaintained"
"build.cmd"
"build.sh"
"build-support"
"images"
"factor.dll.exp"
"factor.dll.lib"
"factor.exp"
"factor.lib"
"libfactor-ffi-test.exp"
"libfactor-ffi-test.lib"
}
: useless-files ( -- seq )
cleanup-list image-names [ boot-image-name ] map append
target-os get macosx? [ "Factor.app" suffix ] unless ;
2008-09-16 00:20:33 -04:00
: tidy ( -- )
"factor" [
useless-files
[ exists? ] filter
[ delete-tree ] each
] with-directory ;