From c1ca60596b924c2bf1090de1d73b57c7e3349541 Mon Sep 17 00:00:00 2001 From: minhanghuang Date: Fri, 21 Jun 2024 14:30:12 +0800 Subject: [PATCH] fix(script): update install script --- README.md | 1 + install.py | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 504a116..1fa8495 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ cd CyberRT ```shell sudo python3 install.py +# sudo python3 install.py --platform --install_prefix ``` > export path diff --git a/install.py b/install.py index 6f0e749..6f30169 100644 --- a/install.py +++ b/install.py @@ -3,6 +3,7 @@ import os import argparse import time +import platform class Install: @@ -55,10 +56,6 @@ def _clone_github_repo(self, repo_url, repo_name, *args): print("clone: {}".format(command)) subprocess.run(command, shell=True) - def _cmd(self, command): - print("[command] {}".format(command)) - subprocess.run(command, shell=True) - def _clone_setup(self): self._clone_github_repo( "https://github.com/minhanghuang/setup.git", @@ -209,7 +206,7 @@ def _clone_dds(self): def parse_config(): parser = argparse.ArgumentParser(description="install") - parser.add_argument("--platform", type=str, default="x86_64", help="platform") + parser.add_argument("--platform", type=str, default=platform.machine(), help="platform") parser.add_argument("--install_prefix", type=str, default="install", help="install prefix") args = parser.parse_args() return args