From: Kartik S. <kar...@us...> - 2004-02-10 03:03:59
|
Update of /cvsroot/perl-ldap/ldap/contrib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12014 Modified Files: ldifdiff.pl Log Message: Lowercase specified attributes for %ciscmp, %dnattrs, and %sharedattrs. Fixed usage message. Index: ldifdiff.pl =================================================================== RCS file: /cvsroot/perl-ldap/ldap/contrib/ldifdiff.pl,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ldifdiff.pl 9 Feb 2004 20:10:55 -0000 1.4 +++ ldifdiff.pl 9 Feb 2004 21:01:46 -0000 1.5 @@ -71,10 +71,10 @@ my (%ciscmp, %dnattrs, %sharedattrs); my $keyattr; GetOptions('a|sourceattrs=s' => sub { @sourceattrs = split(/,/, $_[1]) }, - 'c|ciscmp=s' => sub { my @a = split(/,/,$_[1]); @ciscmp{@a} = (1) x @a }, - 'dnattrs=s' => sub { my @a = split(/,/,$_[1]); @dnattrs{@a} = (1) x @a }, + 'c|ciscmp=s' => sub { my @a = split(/,/,lc $_[1]); @ciscmp{@a} = (1) x @a }, + 'dnattrs=s' => sub { my @a = split(/,/,lc $_[1]); @dnattrs{@a} = (1) x @a }, 'k|keyattr=s' => \$keyattr, - 'sharedattrs=s' => sub { my @a=split(/,/,$_[1]); @sharedattrs{@a}=(1)x @a } + 'sharedattrs=s' => sub {my @a=split(/,/,lc $_[1]);@sharedattrs{@a}=(1) x @a} ); %ciscmp = (objectclass => 1, manager => 1, member => 1, owner => 1, uniquemember => 1) @@ -88,11 +88,11 @@ my ($sourcefile, $targetfile); $sourcefile = shift; $targetfile = shift; -die "usage: $0 -k keyattr [-a attr1,attr2,...] sourcefile targetfile\n" +die "usage: $0 -k|--keyattr keyattr [-a|--sourceattrs attr1,attr2,...] [-c|--ciscmp attr1,...] [--dnattrs attr1,...] [--sharedattrs attr1,...] sourcefile targetfile\n" unless $keyattr && $sourcefile && $targetfile; my $source = Net::LDAP::LDIF->new($sourcefile) - or die "Can't open LDIF file $sourcefile\n: $!\n"; + or die "Can't open LDIF file $sourcefile: $!\n"; my $target = Net::LDAP::LDIF->new($targetfile) or die "Can't open LDIF file $targetfile: $!\n"; |