From 3e6ced5b211edca5af3b39346b41f8ecebef5b64 Mon Sep 17 00:00:00 2001 From: ralfulrich <ralf.ulrich@kit.edu> Date: Fri, 17 Jul 2020 12:36:46 +0200 Subject: [PATCH] improve stability and printout --- do-copyright.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/do-copyright.py b/do-copyright.py index a7afeff75..7bbec19c2 100755 --- a/do-copyright.py +++ b/do-copyright.py @@ -10,7 +10,6 @@ import re text = """/* * (c) Copyright YEAR CORSIKA Project, corsika-project@lists.kit.edu * - * * This software is distributed under the terms of the GNU General Public * Licence version 3 (GPL Version 3). See file LICENSE for a full version of * the license. @@ -22,7 +21,7 @@ Debug settings are 0: nothing, 1: checking, 2: filesystem """ Debug = 0 -excludeDirs = ["ThirdParty", "git"] +excludeDirs = ["ThirdParty", "git", "build", "install"] excludeFiles = ['PhysicalConstants.h','CorsikaFenvOSX.cc', 'sgn.h'] extensions = [".cc", ".h", ".test"] @@ -111,7 +110,7 @@ def checkNote(filename, justCheck, forYear): if not re.match(regex, lines[startNote[0]+iLine].strip(" \n")): isSame = False foundMissing = True - print ("needs update: " + filename + " new=\'" + noteLines[iLine] + "\' vs old=\'" + lines[startNote[0]+iLine].rstrip('\n') + "\'") + print ("needs update: " + filename + "\n [diff] new=\'" + noteLines[iLine] + "\' vs old=\'" + lines[startNote[0]+iLine].rstrip('\n') + "\'") break if Debug>0: print ("isSame=" + str(isSame) + " " + str(len(startNote))) @@ -129,7 +128,7 @@ def checkNote(filename, justCheck, forYear): return """ add (new) copyright notice here: """ - print ("File: " + filename + ", make copy to " + filename+".bak") + print (" [file] " + filename + " --> backup to " + filename+".bak") os.rename(filename, filename+".bak") with open(filename, "w") as file: -- GitLab