]> gitweb.factorcode.org Git - factor.git/blob - extra/mason/release/tidy/tidy.factor
Factor source files should not be executable
[factor.git] / extra / mason / release / tidy / tidy.factor
1 ! Copyright (C) 2008 Eduardo Cavazos, Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: bootstrap.image continuations debugger fry io.directories
4 io.directories.hierarchy io.encodings.ascii io.files io.launcher
5 kernel mason.common namespaces sequences ;
6 FROM: mason.config => target-os ;
7 IN: mason.release.tidy
8
9 : common-files ( -- seq )
10     "build-support/cleanup" ascii file-lines
11     images [ boot-image-name ] map
12     append ;
13
14 : remove-common-files ( -- )
15     common-files [ really-delete-tree ] each ;
16
17 : remove-factor-app ( -- )
18     target-os get "macosx" =
19     [ "Factor.app" really-delete-tree ] unless ;
20
21 : tidy ( -- )
22     "factor" [ remove-factor-app remove-common-files ] with-directory ;