| 49 | return False |
| 50 | |
| 51 | def run_script(path): |
| 52 | if os.path.exists(path): |
| 53 | file_path = os.path.dirname(path) |
| 54 | file_name = os.path.basename(path) |
| 55 | file_extension = path.split(".")[-1] |
| 56 | #file_name, file_extension = os.path.splitext(path) |
| 57 | |
| 58 | if file_extension.lower() == "py": |
| 59 | subprocess.check_call('python -u {0}'.format(file_name), cwd=file_path, shell=True) |
| 60 | elif file_extension.lower() == "sh" or file_extension.lower() == "bsh": |
| 61 | subprocess.check_call('chmod +x {0}'.format(file_name), cwd=file_path, shell=True) |
| 62 | subprocess.check_call('sed -i "s/\r//g" {0}'.format(file_name), cwd=file_path, shell=True) |
| 63 | subprocess.check_call('./{0}'.format(file_name), cwd=file_path, shell=True) |
| 64 | else: |
| 65 | print("Unknown file extension in {0}".format(path)) |
| 66 | else: |
| 67 | print("Could not find the file {0}".format(path)) |
| 68 | |
| 69 | |
| 70 | # Inject the version of CoolProp into the doxygen configuration files |