From 12daea5f5954699f540ef14d819c92c4e73d7bac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Thu, 21 Nov 2013 16:55:45 +0200 Subject: [PATCH] Make 'emsdk active_path' easier to use by not needing a parameter of which tools/sdks to activate. --- emsdk | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/emsdk b/emsdk index faaf749..06faf26 100755 --- a/emsdk +++ b/emsdk @@ -866,21 +866,11 @@ def main(): return 0 elif cmd == 'active_path': - if len(sys.argv) <= 2: - sdk = currently_active_sdk() - if sdk == None: - print "Missing tool/SDK name and no active SDK detected. Type 'emsdk active_path ' to query a list of directories that should be added to PATH to use the specified tool or SDK." - return 1 - else: - sys.argv += [str(sdk)] - tool = find_tool(sys.argv[2]) - if tool == None: - tool = find_sdk(sys.argv[2]) - if tool == None: - print "Error: No tool or SDK found by name '" + sys.argv[2] + "'." - return 1 + tools_to_activate = currently_active_tools() + for i in range(2, len(sys.argv)): + tool = find_tool(sys.argv[i]) + tools_to_activate += [tool] - tools_to_activate = [tool] + tool.recursive_dependencies() print path_additions(tools_to_activate) return 0