yu.dong | c33b307 | 2024-08-21 23:14:49 -0700 | [diff] [blame^] | 1 | import sys |
| 2 | import os |
| 3 | |
| 4 | codegen_single_Modem_ptr_file = sys.argv[1] |
| 5 | |
| 6 | if sys.version_info[0] >= 3: |
| 7 | f = open(codegen_single_Modem_ptr_file, "r", errors="ignore") |
| 8 | else: |
| 9 | f = open(codegen_single_Modem_ptr_file, "r") |
| 10 | file_list = f.readlines() |
| 11 | f.close() |
| 12 | |
| 13 | new_codegen_single_Modem_ptr_content = "" |
| 14 | for i, line in enumerate(file_list): |
| 15 | if "utmd_precodegen.h" not in line: |
| 16 | new_codegen_single_Modem_ptr_content += line |
| 17 | |
| 18 | f = open(codegen_single_Modem_ptr_file, "w") |
| 19 | f.write(new_codegen_single_Modem_ptr_content) |
| 20 | f.close() |