Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Some improvements to the file-name cleaning code:
[rsync/rsync.git]
/
support
/
cull_options
diff --git
a/support/cull_options
b/support/cull_options
index
5e31cb0
..
3ef470d
100755
(executable)
--- a/
support/cull_options
+++ b/
support/cull_options
@@
-4,13
+4,19
@@
# is included in the rrsync script.
use strict;
# 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>) {
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]"/) {
$short_no_arg{$1} = 1;
undef $last_long_opt;
} elsif (/\Qasprintf(\E[^,]+, "-([a-zA-Z0-9])\%l?[ud]"/) {
@@
-42,7
+48,7
@@
print <<EOT;
# and only in the option format that the stock rsync produces.
# To disable a short-named option, add its letter to this string:
# and only in the option format that the stock rsync produces.
# To disable a short-named option, add its letter to this string:
-our \$short_disabled = '';
+our \$short_disabled = '
s
';
our \$short_no_arg = '$short_no_arg'; # DO NOT REMOVE ANY
our \$short_with_num = '$short_with_num'; # DO NOT REMOVE ANY
our \$short_no_arg = '$short_no_arg'; # DO NOT REMOVE ANY
our \$short_with_num = '$short_with_num'; # DO NOT REMOVE ANY
@@
-55,7
+61,7
@@
EOT
foreach my $opt (sort keys %long_opt) {
my $val = $long_opt{$opt};
foreach my $opt (sort keys %long_opt) {
my $val = $long_opt{$opt};
- $val = 1 if $opt =~ /^
max-
/;
+ $val = 1 if $opt =~ /^
(max-|min-)
/;
$val = 3 if $opt eq 'files-from';
$val = '$ro ? -1 : ' . $val if $opt =~ /^remove-/;
print " '$opt' => $val,\n";
$val = 3 if $opt eq 'files-from';
$val = '$ro ? -1 : ' . $val if $opt =~ /^remove-/;
print " '$opt' => $val,\n";