diff --git a/do-clang-format.py b/do-clang-format.py
index 10a04073eb50cd23fa69b29ba63ed87dbe389b9c..4dc30a1a5e3743e8fde8f75d93515a5b2f596136 100755
--- a/do-clang-format.py
+++ b/do-clang-format.py
@@ -8,6 +8,7 @@ import argparse
 import subprocess as subp
 import os
 import sys
+import re
 
 parser = argparse.ArgumentParser(description=__doc__)
 parser.add_argument('--apply', action="store_true",
@@ -17,20 +18,20 @@ parser.add_argument("--all", action="store_true",
 
 args = parser.parse_args()
 
-excludeDirs = ["./modules", "./externals", "build", "install", "git"]
+excludeDirs = [r"^(\./)?modules/", r"^(\./)?externals/", r"^(\./)?build", r"^(\./)?install", r"(\./)?\.git"]
 
 filelist = []
 if args.all:
     for dirpath, dirnames, filenames in os.walk("."):
         excl = False
         for excl_dir in excludeDirs:
-            if excl_dir in dirpath:
+            if re.findall(excl_dir, dirpath):
                 excl = True
                 break
         if excl:
             continue
         for f in filenames:
-            if f.endswith(".hpp") or f.endswith(".cpp"):
+            if (f.endswith(".hpp") or f.endswith(".cpp") or f.endswith(".inl")):
                 filename = os.path.join(dirpath, f)
                 if not os.path.islink(filename):
                     filelist.append(filename)
@@ -47,18 +48,31 @@ else:
             filelist.append(line[1:].lstrip())
 
     cmd = "git ls-files --exclude-standard --others"
-    filelist += subp.check_output(cmd, shell=True).decode("utf8").strip().split("\n")
-    filelist = [x for x in filelist
-                if "./externals" not in x and
-                   "./modules" not in x and
-                   (x.endswith(".hpp") or x.endswith(".cpp"))]
+    filelist2 = subp.check_output(cmd, shell=True).decode("utf8").strip().split("\n")
+    filelist += filelist2
+    # some cleanup
+    filelist_clean = []
+    for f in filelist:
+        if not (f.endswith(".hpp") or f.endswith(".cpp") or f.endswith(".inl")):
+            continue
+        if os.path.islink(f):
+            continue
+        excl = False
+        for excl_dir in excludeDirs:
+            if re.findall(excl_dir, f):
+                excl = True
+                break
+        if excl:
+            continue
+        filelist_clean.append(f)
+    filelist = filelist_clean
 
 cmd = "clang-format"
 if "CLANG_FORMAT" in os.environ:
   cmd = os.environ["CLANG_FORMAT"]
 cmd +=  " -style=file"
 if args.apply:
-    for filename in filelist:
+    for filename in filelist:        
         subp.check_call(cmd.split() + ["-i", filename])
 
 else:
diff --git a/do-copyright.py b/do-copyright.py
index e550f303e577860c369145152194238f2ddf5240..1fb31e082e9847e7173b15fe1c384f5a142def15 100755
--- a/do-copyright.py
+++ b/do-copyright.py
@@ -24,7 +24,7 @@ Debug = 0
 excludeDirs = ["./modules", "./externals", "build", "install", "git"]
 excludeFiles = ['PhysicalConstants.h','CorsikaFenvOSX.cc', 'sgn.h', 'quartic.h']
 
-extensions = [".cpp", ".hpp"]
+extensions = [".cpp", ".inl", ".hpp"]
 
 """
 justCheck: T: only checking, F: also changing files