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:
@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user