kiwi-scp/kiwi/src/kiwi_scp/main.py

22 lines
495 B
Python
Raw Normal View History

import os
import subprocess
import sys
from virtualenv import cli_run
2024-04-29 22:47:55 +00:00
def main() -> None:
# TODO location
if not os.access("/tmp/kiwi/bin/kiwi-core", os.X_OK):
cli_run(["/tmp/kiwi"])
subprocess.check_call(["/tmp/kiwi/bin/python3", "-m", "pip", "install", "."])
try:
subprocess.check_call(["/tmp/kiwi/bin/kiwi-core", *sys.argv[1::]])
except subprocess.CalledProcessError as exc:
sys.exit(exc.returncode)
2024-04-29 22:47:55 +00:00
if __name__ == "__main__":
main()