Allow multiple tools to be passed to the install command.

This commit is contained in:
Jukka Jylänki
2015-09-15 14:36:05 +03:00
parent 9bcd44da58
commit 4f5cbc4ea8

11
emsdk
View File

@@ -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,11 +1687,12 @@ 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:]:
tool = find_tool(t)
if tool == None: if tool == None:
tool = find_sdk(sys.argv[2]) tool = find_sdk(t)
if tool == None: if tool == None:
print("Error: No tool or SDK found by name '" + sys.argv[2] + "'.") print("Error: No tool or SDK found by name '" + t + "'.")
return 1 return 1
success = tool.install() success = tool.install()
if not success: if not success: