Allow multiple tools to be passed to the install command.
This commit is contained in:
23
emsdk
23
emsdk
@@ -1452,8 +1452,8 @@ def main():
|
|||||||
emsdk update - Fetches a list of updates from the net (but
|
emsdk update - Fetches a list of updates from the net (but
|
||||||
does not install them)
|
does not install them)
|
||||||
|
|
||||||
emsdk install [-j<num>] [--build=type] [--shallow] <tool/sdk>
|
emsdk install [-j<num>] [--build=type] [--shallow] <tool 1> <tool 2> ...
|
||||||
- Downloads and installs the given tool or SDK.
|
- Downloads and installs given tools or SDKs.
|
||||||
An optional -j<num> specifier can be used to
|
An optional -j<num> specifier can be used to
|
||||||
specify the number of cores to use when
|
specify the number of cores to use when
|
||||||
building the tool. (default: use one less
|
building the tool. (default: use one less
|
||||||
@@ -1687,15 +1687,16 @@ def main():
|
|||||||
if len(sys.argv) <= 2:
|
if len(sys.argv) <= 2:
|
||||||
print("Missing parameter. Type 'emsdk install <tool name>' to install a tool or an SDK. Type 'emsdk list' to obtain a list of available tools. Type 'emsdk install latest' to automatically install the newest version of the SDK.")
|
print("Missing parameter. Type 'emsdk install <tool name>' to install a tool or an SDK. Type 'emsdk list' to obtain a list of available tools. Type 'emsdk install latest' to automatically install the newest version of the SDK.")
|
||||||
return 1
|
return 1
|
||||||
tool = find_tool(sys.argv[2])
|
for t in sys.argv[2:]:
|
||||||
if tool == None:
|
tool = find_tool(t)
|
||||||
tool = find_sdk(sys.argv[2])
|
if tool == None:
|
||||||
if tool == None:
|
tool = find_sdk(t)
|
||||||
print("Error: No tool or SDK found by name '" + sys.argv[2] + "'.")
|
if tool == None:
|
||||||
return 1
|
print("Error: No tool or SDK found by name '" + t + "'.")
|
||||||
success = tool.install()
|
return 1
|
||||||
if not success:
|
success = tool.install()
|
||||||
return 1
|
if not success:
|
||||||
|
return 1
|
||||||
elif cmd == 'uninstall':
|
elif cmd == 'uninstall':
|
||||||
if len(sys.argv) <= 2:
|
if len(sys.argv) <= 2:
|
||||||
print("Syntax error. Call 'emsdk uninstall <tool name>'. Call 'emsdk list' to obtain a list of available tools.")
|
print("Syntax error. Call 'emsdk uninstall <tool name>'. Call 'emsdk list' to obtain a list of available tools.")
|
||||||
|
|||||||
Reference in New Issue
Block a user