()
| 69 | def write_lines(path, lines): |
| 70 | with open(path, "w") as f: |
| 71 | f.writelines(lines) |
| 72 | |
| 73 | # Bashrc patch logic |
| 74 | def patch_bashrc(): |
| 75 | if not os.path.exists(BASHRC_GLOBAL): |
| 76 | return |
| 77 | lines = read_lines(BASHRC_GLOBAL) |
| 78 | for i, line in enumerate(lines): |
| 79 | if "Settings.py" in line and "sleep" not in line: |
| 80 | lines[i] = f"(sleep 12; {line.strip()}) &\n" |
| 81 | write_lines(BASHRC_GLOBAL, lines) |
| 82 | break |
no test coverage detected