|
2 | 2 | #
|
3 | 3 | # Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved.
|
4 | 4 | # Copyright (c) 2016-2017 Intel, Inc. All rights reserved.
|
| 5 | +# Copyright (c) 2017 IBM Corporation. All rights reserved. |
5 | 6 | # $COPYRIGHT$
|
6 | 7 | #
|
7 | 8 |
|
|
66 | 67 | # Defaults
|
67 | 68 | my $my_search_name = "Cisco";
|
68 | 69 | my $my_formal_name = "Cisco Systems, Inc. All rights reserved.";
|
| 70 | +my $my_manual_list = ""; |
69 | 71 |
|
70 | 72 | # Protected directories
|
71 | 73 | my @protected = qw(
|
|
80 | 82 | if (defined($ENV{OMPI_COPYRIGHT_SEARCH_NAME}));
|
81 | 83 | $my_formal_name = $ENV{OMPI_COPYRIGHT_FORMAL_NAME}
|
82 | 84 | if (defined($ENV{OMPI_COPYRIGHT_FORMAL_NAME}));
|
| 85 | +$my_manual_list = $ENV{OMPI_COPYRIGHT_MANUAL_LIST} |
| 86 | + if (defined($ENV{OMPI_COPYRIGHT_MANUAL_LIST})); |
83 | 87 |
|
84 | 88 | GetOptions(
|
85 | 89 | "help" => \$HELP,
|
86 | 90 | "quiet" => \$QUIET,
|
87 | 91 | "check-only" => \$CHECK_ONLY,
|
88 | 92 | "search-name=s" => \$my_search_name,
|
89 | 93 | "formal-name=s" => \$my_formal_name,
|
| 94 | + "manual-list=s" => \$my_manual_list, |
90 | 95 | ) or die "unable to parse options, stopped";
|
91 | 96 |
|
92 | 97 | if ($HELP) {
|
|
98 | 103 | --check-only exit(111) if there are files with copyrights to edit
|
99 | 104 | --search-name=NAME Set search name to NAME
|
100 | 105 | --formal-same=NAME Set formal name to NAME
|
| 106 | +--manual-list=FNAME Use specified file as list of files to mod copyright |
101 | 107 | EOT
|
102 | 108 | exit(0);
|
103 | 109 | }
|
@@ -143,6 +149,8 @@ sub quiet_print {
|
143 | 149 | if (-d "$top/.hg");
|
144 | 150 | $vcs = "svn"
|
145 | 151 | if (-d "$top/.svn");
|
| 152 | +$vcs = "manual" |
| 153 | + if ("$my_manual_list" ne ""); |
146 | 154 |
|
147 | 155 | my @files = find_modified_files($vcs);
|
148 | 156 |
|
@@ -363,6 +371,9 @@ sub find_modified_files {
|
363 | 371 | }
|
364 | 372 | close(CMD);
|
365 | 373 | }
|
| 374 | + elsif ($vcs eq "manual") { |
| 375 | + @files = split(/\n/, `cat $my_manual_list`); |
| 376 | + } |
366 | 377 | else {
|
367 | 378 | die "unknown VCS '$vcs', stopped";
|
368 | 379 | }
|
|
0 commit comments