|
Lines 30-44
use Getopt::Long;
Link Here
|
| 30 |
use Koha::SearchEngine::Search; |
30 |
use Koha::SearchEngine::Search; |
| 31 |
|
31 |
|
| 32 |
my @authtypes; |
32 |
my @authtypes; |
| 33 |
my $want_help = 0; |
33 |
my ($confirm, $test, $want_help); |
| 34 |
my $test = 0; |
|
|
| 35 |
GetOptions( |
34 |
GetOptions( |
| 36 |
'aut|authtypecode:s' => \@authtypes, |
35 |
'aut|authtypecode:s' => \@authtypes, |
|
|
36 |
'c|confirm' => \$confirm, |
| 37 |
't|test' => \$test, |
37 |
't|test' => \$test, |
| 38 |
'h|help' => \$want_help |
38 |
'h|help' => \$want_help, |
| 39 |
); |
39 |
); |
| 40 |
|
40 |
|
| 41 |
if ($want_help) { |
41 |
if ( $want_help || !$confirm ) { |
| 42 |
print_usage(); |
42 |
print_usage(); |
| 43 |
exit 0; |
43 |
exit 0; |
| 44 |
} |
44 |
} |
|
Lines 129-139
particular type will be checked for usage. --aut can be repeated.
Link Here
|
| 129 |
|
129 |
|
| 130 |
If --aut is not supplied, all authority records will be checked. |
130 |
If --aut is not supplied, all authority records will be checked. |
| 131 |
|
131 |
|
|
|
132 |
Use --confirm Confirms you want to really run this script, otherwise prints this help. |
| 133 |
|
| 132 |
Use --test to perform a test run. This script does not ask the |
134 |
Use --test to perform a test run. This script does not ask the |
| 133 |
operator to confirm the deletion of each authority record. |
135 |
operator to confirm the deletion of each authority record. |
| 134 |
|
136 |
|
| 135 |
parameters |
137 |
parameters |
| 136 |
--aut|authtypecode TYPE the list of authtypes to check |
138 |
--aut|authtypecode TYPE the list of authtypes to check |
|
|
139 |
--confirm or -c confirm running of script |
| 137 |
--test or -t test mode, don't delete really, just count |
140 |
--test or -t test mode, don't delete really, just count |
| 138 |
--help or -h show this message. |
141 |
--help or -h show this message. |
| 139 |
|
142 |
|
| 140 |
- |
|
|