|
Lines 33-39
use Pod::Usage;
Link Here
|
| 33 |
use C4::Context; |
33 |
use C4::Context; |
| 34 |
my $dbh = C4::Context->dbh; |
34 |
my $dbh = C4::Context->dbh; |
| 35 |
|
35 |
|
| 36 |
my ( $help, $cmd, $filename, $override, $compare_add, $compare_del, $compare_upd, $ignore_opt ); |
36 |
my ( $help, $cmd, $filename, $override, $compare_add, $compare_del, $compare_upd, $ignore_opt, $partial ); |
| 37 |
GetOptions( |
37 |
GetOptions( |
| 38 |
'help' => \$help, |
38 |
'help' => \$help, |
| 39 |
'cmd:s' => \$cmd, |
39 |
'cmd:s' => \$cmd, |
|
Lines 42-47
GetOptions(
Link Here
|
| 42 |
'del' => \$compare_del, |
42 |
'del' => \$compare_del, |
| 43 |
'upd' => \$compare_upd, |
43 |
'upd' => \$compare_upd, |
| 44 |
'ign-opt' => \$ignore_opt, |
44 |
'ign-opt' => \$ignore_opt, |
|
|
45 |
'partial' => \$partial, |
| 45 |
); |
46 |
); |
| 46 |
|
47 |
|
| 47 |
if ( $filename && !-e $filename && $cmd !~ /^b/ ) { |
48 |
if ( $filename && !-e $filename && $cmd !~ /^b/ ) { |
|
Lines 98-103
sub PrintCompare {
Link Here
|
| 98 |
my ( $ch, $s1, $s2 ) = @_; |
99 |
my ( $ch, $s1, $s2 ) = @_; |
| 99 |
foreach ( sort keys %$ch ) { |
100 |
foreach ( sort keys %$ch ) { |
| 100 |
my $v = $ch->{$_}; |
101 |
my $v = $ch->{$_}; |
|
|
102 |
next if $v eq '1' && $partial; |
| 101 |
print "$_: "; |
103 |
print "$_: "; |
| 102 |
if ( $v eq '1' ) { print "Not in $s2"; } |
104 |
if ( $v eq '1' ) { print "Not in $s2"; } |
| 103 |
elsif ( $v eq '2' ) { print "Not in $s1"; } |
105 |
elsif ( $v eq '2' ) { print "Not in $s1"; } |
|
Lines 308-313
Command: backup, compare, restore or test.
Link Here
|
| 308 |
|
310 |
|
| 309 |
Name of the file used in command. |
311 |
Name of the file used in command. |
| 310 |
|
312 |
|
|
|
313 |
=item B<-partial> |
| 314 |
|
| 315 |
Only for partial compares: skip 'not present in file'-messages. |
| 316 |
|
| 311 |
=item B<-add> |
317 |
=item B<-add> |
| 312 |
|
318 |
|
| 313 |
Only for compares: restore preferences not present in database. |
319 |
Only for compares: restore preferences not present in database. |
| 314 |
- |
|
|