Skip to content

Commit

Permalink
[feat]:添加系统arch信息
Browse files Browse the repository at this point in the history
  • Loading branch information
fishros committed Feb 5, 2022
1 parent f94178f commit 6090483
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class Tool(BaseTool):

信息:
1. osversion 系统相关信息

2. osarch 架构信息 amd64/i386/arm

## 贡献名单

Expand Down
6 changes: 5 additions & 1 deletion tools/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,7 @@ def getArch():
result = CmdTask("dpkg --print-architecture",2).run()
if result[0]==0: return result[1][0].strip("\n")
PrintUtils.print_error("小鱼提示:自动获取系统架构失败...请手动选择")
# @TODO 提供架构选项 amd64,i386,arm
return None

@staticmethod
Expand Down Expand Up @@ -1065,4 +1066,7 @@ def download_tools(id,tools):
# download dep
for dep in tools[id]['dep']:
url = tools[dep]['tool']
os.system("wget {} -O /tmp/fishinstall/tools/{} --no-check-certificate".format(url,url[url.rfind('/')+1:]))
os.system("wget {} -O /tmp/fishinstall/tools/{} --no-check-certificate".format(url,url[url.rfind('/')+1:]))


osarch = AptUtils.getArch()

0 comments on commit 6090483

Please sign in to comment.