From 2b576b0813e6902f395d057c73a117aa26c6b0ab Mon Sep 17 00:00:00 2001 From: "C. Michael Pilato" Date: Fri, 31 Dec 2021 09:55:48 -0500 Subject: [PATCH] Skip SCM admin directories when bumping copyright years --- tools/bump-copyright-years | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/bump-copyright-years b/tools/bump-copyright-years index 92b8200..5c9eac1 100755 --- a/tools/bump-copyright-years +++ b/tools/bump-copyright-years @@ -48,6 +48,10 @@ def bump_years_recursive(target_dir, year): children = os.listdir(target_dir) for child in children: child_path = os.path.join(target_dir, child) + if child in [".git", ".svn"]: + sys.stderr.write("Skipping SCM administrative directory: %s\n" + % (child_path)) + continue if os.path.isfile(child_path): try: replace_end_year(child_path, year)