[Bps-public-commit] Prophet branch, master, updated. 501d2fd5d6c5c2c22ad172db6422a8c7213de14b

sunnavy at bestpractical.com sunnavy at bestpractical.com
Tue Aug 18 00:58:49 EDT 2009


The branch, master has been updated
       via  501d2fd5d6c5c2c22ad172db6422a8c7213de14b (commit)
      from  03c7cea1e28abf882fd1d1f64f5e2d32eb78210e (commit)

Summary of changes:
 lib/Prophet/CLI/PublishCommand.pm |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

- Log -----------------------------------------------------------------
commit 501d2fd5d6c5c2c22ad172db6422a8c7213de14b
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Tue Aug 18 12:58:42 2009 +0800

    tweak for cwrsync

diff --git a/lib/Prophet/CLI/PublishCommand.pm b/lib/Prophet/CLI/PublishCommand.pm
index d5dd9d9..36e9c65 100644
--- a/lib/Prophet/CLI/PublishCommand.pm
+++ b/lib/Prophet/CLI/PublishCommand.pm
@@ -26,6 +26,17 @@ sub publish_dir {
     # cases we sometimes export to the same directory in quick succession)
     push @args, '--ignore-times';
     
+    if ( $^O =~ /MSWin/ ) {
+        for (qw/from to/) {
+            $args{$_} =~ s!^([A-Z]):!'/cygdrive/' . lc $1!eg;
+            $args{$_} =~ s!\\!/!g;
+            $args{$_} =~ s!/DOCUME~1!/Documents And Settings!g;
+            $args{$_} =~ s!/ADMINI~1!/Administrator!g;
+            $args{$_} =~ s!/LOCALS~1!/Local Settings!g;
+            $args{$_} = q{"} . $args{$_} . q{"};
+        }
+    }
+    
     push @args, '--recursive', '--' , $args{from}, $args{to};
 
     my $rsync = $ENV{RSYNC} || "rsync";

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list