Skip to content

Commit 665850e

Browse files
author
Ralph Castain
committed
Use regex to define the protected files
Signed-off-by: Ralph Castain <[email protected]>
1 parent 2f0aec7 commit 665850e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

contrib/update-my-copyright.pl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,12 @@
6868
my $my_formal_name = "Cisco Systems, Inc. All rights reserved.";
6969

7070
# Protected directories
71-
my @protected = qw(pmi2x/pmix/ hwloc1113/hwloc/ libevent2022/libevent/);
71+
my @protected = qw(
72+
opal\\/mca\\/pmi\\/pmix.+?\\/pmix\\/
73+
opal\\/mca\\/hwloc\\/hwloc.+?\\/hwloc\\/
74+
opal\\/mca\\/libevent\\/libevent.+?\\/libevent\\/
75+
contrib\\/update-my-copyright.pl
76+
);
7277

7378
# Override the defaults if some values are set in the environment
7479
$my_search_name = $ENV{OMPI_COPYRIGHT_SEARCH_NAME}
@@ -155,7 +160,7 @@ sub quiet_print {
155160
# the copyright
156161
my $ignore = 0;
157162
foreach my $p (@protected) {
158-
if (index($f, $p) != -1) {
163+
if (eval("\$f =~ /$p/")) {
159164
quiet_print "Ignoring protected file $f\n";
160165
$ignore = 1;
161166
last;

0 commit comments

Comments
 (0)