Files
Ivan f8b0dd18c5 refactor: clean up code and improve variable naming
- Removed unnecessary blank lines in cx_setup.py.
- Reformatted conditional checks in meshchat.py for better readability.
- Updated callback variable names in NomadnetDownloader for clarity.
- Adjusted version string formatting in version.py for consistency.
- Reordered import statements in prepare_frontend_dir.py for better organization.
2025-12-01 12:18:01 -06:00

15 lines
363 B
Python

import shutil
from pathlib import Path
TARGET = Path("meshchatx") / "public"
if not Path("pyproject.toml").exists():
raise RuntimeError("Must run from project root")
if TARGET.exists():
if TARGET.is_symlink():
raise RuntimeError(f"{TARGET} is a symlink, refusing to remove")
shutil.rmtree(TARGET)
TARGET.mkdir(parents=True, exist_ok=True)