--- nfo/perl/scripts/outlook2ldap/bin/feed.pl 2003/01/18 18:20:45 1.1 +++ nfo/perl/scripts/outlook2ldap/bin/feed.pl 2003/01/19 03:34:59 1.2 @@ -1,9 +1,12 @@ #!/usr/bin/perl ## -------------------------------------------------------------------------------- -## $Id: feed.pl,v 1.1 2003/01/18 18:20:45 joko Exp $ +## $Id: feed.pl,v 1.2 2003/01/19 03:34:59 joko Exp $ ## -------------------------------------------------------------------------------- ## $Log: feed.pl,v $ +## Revision 1.2 2003/01/19 03:34:59 joko +## + new command-line-arguments +## ## Revision 1.1 2003/01/18 18:20:45 joko ## + initial check-in ## @@ -20,6 +23,8 @@ #require "$Bin/use_libs.pl"; } +use Tie::IxHash; + use lib qw( ../libs ../etc C:\home\amo\develop\netfrag.org\nfo\perl\libs ); use Torus::Logger; @@ -109,10 +114,12 @@ GetOptions( 'source=s' => \$self->{opt}->{source}, - 'node=s' => \$self->{opt}->{node}, + 'source-type=s' => \$self->{opt}->{'source-type'}, + 'source-node=s' => \$self->{opt}->{'source-node'}, 'target=s' => \$self->{opt}->{target}, + 'target-node=s' => \$self->{opt}->{'target-node'}, 'action=s' => \$self->{opt}->{action}, - 'mapping=s' => \$self->{opt}->{mapping}, + 'mapping-module=s' => \$self->{opt}->{'mapping-module'}, 'prepare' => \$self->{opt}->{prepare}, 'fresh' => \$self->{opt}->{fresh}, 'help' => \&usage, @@ -177,16 +184,37 @@ $erase = 1; #$import = 1; } - $self->{process}->startSync({ - source => $self->{opt}->{source}, - source_node => $self->{opt}->{node}, - target => $self->{opt}->{target}, - mode => $mode, - erase => $erase, - import => $import, - mapping => $self->{opt}->{mapping}, - prepare => $self->{opt}->{prepare}, - }); + + +#print Dumper($self->{opt}); +#exit; + + my %syncConfig; + tie %syncConfig, 'Tie::IxHash'; + %syncConfig = ( + map => { + moduleName => $self->{opt}->{'mapping-module'}, + }, + source => { + dbKey => $self->{opt}->{source}, + nodeType => $self->{opt}->{'source-type'}, + nodeName => $self->{opt}->{'source-node'}, + }, + target => { + dbKey => $self->{opt}->{target}, + nodeName => $self->{opt}->{'target-node'}, + }, + process => { + mode => $mode, + erase => $erase, + import => $import, + prepare => $self->{opt}->{prepare}, + }, + ); + +#print Dumper(\%syncConfig); + + $self->{process}->startSync( \%syncConfig ); =pod } else {