3 from os import path, environ
5 import subprocess as subp
8 source_root = path.dirname(path.realpath(__file__))
9 source_root = environ.get("MESON_SOURCE_ROOT", source_root)
13 "--options=.astylerc",
26 for path in "**/*.sh", "**/*.test", ".ci/**/*.sh":
27 shfmt_cmd.extend(glob.glob(path, root_dir=source_root, recursive=True))
29 for cmd in astyle_cmd, shfmt_cmd:
31 result = subp.run(cmd, cwd=source_root, check=True)
32 except FileNotFoundError as e:
33 print("Warning: missing", cmd[0], file=stderr)