View | Details | Raw Unified | Return to bug 21865
Collapse All | Expand All

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

Return to bug 21865