MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / patch_bashrc

Function patch_bashrc

Scripts/Other Tools/Loading Screen.py:71–79  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

69def write_lines(path, lines):
70 with open(path, "w") as f:
71 f.writelines(lines)
72
73# Bashrc patch logic
74def 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

Callers 2

install_loading_screenFunction · 0.70

Calls 2

read_linesFunction · 0.70
write_linesFunction · 0.70

Tested by

no test coverage detected