File script-interpreter-only-for-exec-scripts.diff of Package rpmlint

--- FilesCheck.py
+++ FilesCheck.py
@@ -1107,7 +1107,7 @@
                         # ...but executed ones should
                         elif res or mode & 0111 != 0 or script_regex.search(f):
                             if res:
-                                if not interpreter_regex.search(res.group(1)):
+                                if mode & 0111 != 0 and not interpreter_regex.search(res.group(1)):
                                     printError(pkg, 'wrong-script-interpreter', f, '"' + res.group(1) + '"')
                             elif not nonexec_file and not (lib_path_regex.search(f) and f.endswith('.la')):
                                 printError(pkg, 'script-without-shebang', f)
openSUSE Build Service is sponsored by