View | Details | Raw Unified | Return to bug 96245
Collapse All | Expand All

(-)pdumpfs-rsync/files/patch-pdumpfs-rsync (-5 / +24 lines)
Lines 1-5 Link Here
1
--- pdumpfs-rsync.orig	Mon Dec 26 12:31:35 2005
1
--- pdumpfs-rsync.orig	Mon Apr 24 11:58:50 2006
2
+++ pdumpfs-rsync	Mon Dec 26 12:33:21 2005
2
+++ pdumpfs-rsync	Mon Apr 24 11:59:49 2006
3
@@ -1,4 +1,4 @@
4
-#!/usr/bin/ruby
5
+#!/usr/local/bin/ruby18
6
 #
7
 # pdumpfs-rsync: remote pdumpfs using rsync
8
 #
3
@@ -15,7 +15,7 @@
9
@@ -15,7 +15,7 @@
4
 # the GNU General Public License version 2.
10
 # the GNU General Public License version 2.
5
 #
11
 #
Lines 9-15 Link Here
9
 require 'ftools'
15
 require 'ftools'
10
 require 'getoptlong'
16
 require 'getoptlong'
11
 
17
 
12
@@ -128,8 +128,10 @@
18
@@ -110,7 +110,7 @@ end
19
 
20
 def main
21
   src, dest, base, matcher, rsync_opts, opts = parse_options
22
-  rsync_array = ['/usr/bin/rsync',
23
+  rsync_array = ['/usr/local/bin/rsync',
24
 		 '-avH',
25
 		 '--delete',
26
 		 '--delete-excluded',
27
@@ -128,8 +128,10 @@ def main
13
     end
28
     end
14
   end
29
   end
15
 
30
 
Lines 22-33 Link Here
22
   rsync_array = rsync_array + rsync_opts
37
   rsync_array = rsync_array + rsync_opts
23
   rsync_array.push(ARGV[0].sub(%r!/+$!, '') + '/')
38
   rsync_array.push(ARGV[0].sub(%r!/+$!, '') + '/')
24
   rsync_array.push(src + '/')
39
   rsync_array.push(src + '/')
25
@@ -141,7 +143,7 @@
40
@@ -141,7 +143,11 @@ def main
26
     if ( $? >> 8 != 0 )
41
     if ( $? >> 8 != 0 )
27
       STDERR.print "WARNING: rsync failed: #{ARGV[0]}; exit value: #{$? >> 8}\n"
42
       STDERR.print "WARNING: rsync failed: #{ARGV[0]}; exit value: #{$? >> 8}\n"
28
     end
43
     end
29
-    update_snapshot(src, src, today, matcher)
44
-    update_snapshot(src, src, today, matcher)
30
+    pdumpfs.update_snapshot(src, src, today, matcher)
45
+    if latest
46
+      pdumpfs.update_snapshot(src, latest, today)
47
+    else
48
+      pdumpfs.recursive_copy(src, today)
49
+    end
31
   else
50
   else
32
     STDERR.print "rsync failed: #{ARGV[0]}; exit value: #{$? >> 8}\n"
51
     STDERR.print "rsync failed: #{ARGV[0]}; exit value: #{$? >> 8}\n"
33
     exit $? >> 8
52
     exit $? >> 8

Return to bug 96245