1
0
Fork 0

auto deploy from workflow

This commit is contained in:
github-actions[bot] 2022-11-13 07:31:23 +00:00
parent 139be248d0
commit 5f2446309f

View file

@ -6,7 +6,7 @@
For more information, please refer to the repository (https://github.com/developomp/setup).
"""
from os import system, geteuid, popen
from os import system, geteuid
from os.path import exists
from shutil import rmtree
import sys
@ -22,12 +22,8 @@ tmp_dir = "/tmp/com.developomp.setup"
#
def run_and_return(command: str) -> list[str]:
return popen(command).readlines()
def command_exists(command: str) -> bool:
return len(run_and_return(f"command -v {command}")) == 1
return system(f"command -v {command} &> /dev/null") == 0
def cleanup() -> None: