refactor(warp): Replace bash installer with python script

Integrates the new `warp.py` script into the installation and uninstallation workflows. This refactors the `install.py` and `uninstall.py` scripts to call the local Python-based WARP manager instead of downloading and executing an external bash script.
This commit is contained in:
ReturnFI
2025-11-21 08:28:54 +00:00
parent 264eff9578
commit e5a0fc467e
3 changed files with 412 additions and 8 deletions

View File

@ -10,6 +10,7 @@ if str(core_scripts_dir) not in sys.path:
from paths import *
WARP_SCRIPT_PATH = Path(__file__).resolve().parent / "warp.py"
WARP_DEVICE = "wgcf"
def is_service_active(service_name: str) -> bool:
@ -18,8 +19,7 @@ def is_service_active(service_name: str) -> bool:
def install_warp():
print("Installing WARP...")
result = subprocess.run("bash <(curl -fsSL https://raw.githubusercontent.com/ReturnFI/Warp/main/warp.sh) wgx",
shell=True, executable="/bin/bash")
result = subprocess.run([sys.executable, str(WARP_SCRIPT_PATH), "install"])
return result.returncode == 0