]> gitweb.factorcode.org Git - factor.git/commitdiff
mason: add workaround for cygwin git issue
authorU-SLAVA-DFB8FF805\Slava <Slava@slava-dfb8ff805.(none)>
Tue, 14 Apr 2009 00:03:17 +0000 (19:03 -0500)
committerU-SLAVA-DFB8FF805\Slava <Slava@slava-dfb8ff805.(none)>
Tue, 14 Apr 2009 00:03:17 +0000 (19:03 -0500)
extra/mason/cleanup/cleanup.factor [changed mode: 0644->0755]
extra/mason/common/common.factor [changed mode: 0644->0755]
extra/mason/release/archive/archive.factor [changed mode: 0644->0755]
extra/mason/release/tidy/tidy.factor [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index a2c0873..a273696
@@ -18,6 +18,6 @@ IN: mason.cleanup
         build-dir [
             compress-image
             compress-test-log
-            "factor" delete-tree
+            "factor" really-delete-tree
         ] with-directory
     ] unless ;
old mode 100644 (file)
new mode 100755 (executable)
index 3cd38e1..047bdaa
@@ -2,11 +2,22 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: kernel namespaces sequences splitting system accessors
 math.functions make io io.files io.pathnames io.directories
-io.launcher io.encodings.utf8 prettyprint
+io.directories.hierarchy io.launcher io.encodings.utf8 prettyprint
 combinators.short-circuit parser combinators calendar
-calendar.format arrays mason.config locals ;
+calendar.format arrays mason.config locals system ;
 IN: mason.common
 
+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 (normalize-path) suffix try-process ]
+    [ delete-tree ]
+    bi ;
+
+M: unix really-delete-tree delete-tree ;
+
 : short-running-process ( command -- )
     #! Give network operations at most 15 minutes to complete.
     <process>
old mode 100644 (file)
new mode 100755 (executable)
index 5ef424a..fff8b83
@@ -29,7 +29,7 @@ IN: mason.release.archive
         "-fs" "HFS+"
     "-volname" "factor" }
     archive-name suffix try-process
-    "dmg-root" delete-tree ;
+    "dmg-root" really-delete-tree ;
 
 : make-unix-archive ( -- )
     [ "tar" , "-cvzf" , archive-name , "factor" , ] { } make try-process ;
old mode 100644 (file)
new mode 100755 (executable)
index 497be09..054b15f
@@ -12,11 +12,11 @@ IN: mason.release.tidy
     append ;
 
 : remove-common-files ( -- )
-    common-files [ delete-tree ] each ;
+    common-files [ really-delete-tree ] each ;
 
 : remove-factor-app ( -- )
     target-os get "macosx" =
-    [ "Factor.app" delete-tree ] unless ;
+    [ "Factor.app" really-delete-tree ] unless ;
 
 : tidy ( -- )
     "factor" [ remove-factor-app remove-common-files ] with-directory ;