on Windows deletes.
build-dir [
compress-image
compress-test-log
- "factor" really-delete-tree
+ "factor" delete-tree
] with-directory
] unless ;
#! 30 minutes to complete, to catch hangs.
>process 30 minutes >>timeout try-output-process ;
-HOOK: (really-delete-tree) os ( path -- )
-
-M: windows (really-delete-tree)
- #! Workaround: Cygwin GIT creates read-only files for
- #! some reason.
- [ { "chmod" "ug+rw" "-R" } swap absolute-path suffix short-running-process ]
- [ delete-tree ]
- bi ;
-
-M: unix (really-delete-tree) delete-tree ;
-
-: really-delete-tree ( path -- )
- dup exists? [ (really-delete-tree) ] [ drop ] if ;
-
: retry ( n quot -- )
[ iota ] dip
'[ drop @ f ] attempt-all drop ; inline
USING: accessors combinators.short-circuit continuations
debugger io io.directories io.encodings.utf8 io.files
io.launcher io.sockets io.streams.string kernel mason.common
-mason.email sequences splitting ;
+mason.email sequences splitting io.directories.hierarchy ;
IN: mason.git
: git-id ( -- id )
: git-repo-corrupted ( error -- )
repo-corrupted-body "corrupted repo" email-fatal
- "factor" really-delete-tree
+ "factor" delete-tree
git-clone ;
: git-pull-failed ( error -- )
: git-repo-dirty ( files -- )
repo-dirty-body "dirty repo" email-fatal
- "factor" really-delete-tree
+ "factor" delete-tree
git-clone ;
PRIVATE>
"dmg-root" make-directory
"factor" "dmg-root" copy-tree-into
"factor" "dmg-root" make-disk-image
- "dmg-root" really-delete-tree ;
+ "dmg-root" delete-tree ;
:: make-unix-archive ( archive-name -- )
{ "tar" "-cvzf" archive-name "factor" } short-running-process ;
"factor" [
useless-files
[ exists? ] filter
- [ really-delete-tree ] each
+ [ delete-tree ] each
] with-directory ;