Updated rrsync to deal with the latest 3.0.0's use of the -e option.
authorWayne Davison <wayned@samba.org>
Wed, 5 Mar 2008 06:50:41 +0000 (22:50 -0800)
committerWayne Davison <wayned@samba.org>
Wed, 5 Mar 2008 06:51:56 +0000 (22:51 -0800)
Added a couple more long options that might get passed.

support/cull_options
support/rrsync

index c85a036..3ef470d 100755 (executable)
@@ -4,13 +4,19 @@
 # is included in the rrsync script.
 use strict;
 
-our(%short_no_arg, %short_with_num, %long_opt);
+our %short_no_arg;
+our %short_with_num;
+our %long_opt = (
+    'no-i-r' => 0,
+    'fake-super' => 0,
+    'log-file' => 3,
+);
 our $last_long_opt;
 
 open(IN, '../options.c') or die "Unable to open ../options.c: $!\n";
 
 while (<IN>) {
-    if (/\Qargstr[x++]\E = '(.)'/) {
+    if (/\Qargstr[x++]\E = '([^.ie])'/) {
        $short_no_arg{$1} = 1;
        undef $last_long_opt;
     } elsif (/\Qasprintf(\E[^,]+, "-([a-zA-Z0-9])\%l?[ud]"/) {
index e1ae6ec..6e1a6eb 100644 (file)
@@ -74,6 +74,7 @@ our %long_opt = (
   'delete-during' => 0,
   'delete-excluded' => 0,
   'existing' => 0,
+  'fake-super' => 0,
   'files-from' => 3,
   'force' => 0,
   'from0' => 0,
@@ -84,6 +85,7 @@ our %long_opt = (
   'inplace' => 0,
   'link-dest' => 2,
   'list-only' => 0,
+  'log-file' => 3,
   'log-format' => 1,
   'max-delete' => 1,
   'max-size' => 1,
@@ -110,6 +112,7 @@ our %long_opt = (
   'super' => 0,
   'temp-dir' => 2,
   'timeout' => 1,
+  'use-qsort' => 0,
 );
 
 ### END of options data produced by the cull_options script. ###
@@ -139,7 +142,7 @@ while ($command =~ /((?:[^\s\\]+|\\.[^\s\\]*)+)/g) {
     if ($_ eq '.') {
       $in_options = 0;
     } else {
-      next if /^-$short_no_arg+(e\d+\.\d+)?$/o || /^-$short_with_num\d+$/o;
+      next if /^-$short_no_arg+(e\d*\.\w*)?$/o || /^-$short_with_num\d+$/o;
 
       my($opt,$arg) = /^--([^=]+)(?:=(.*))?$/;
       my $disabled;