| Index: dart/tools/list_pkg_directories.py
|
| diff --git a/dart/tools/list_pkg_directories.py b/dart/tools/list_pkg_directories.py
|
| index e4cf368bfa23a1f7253dcff0b3c8c7471bca2116..6d015642dbb4dd0db62b33a6f65083f8d79b9691 100644
|
| --- a/dart/tools/list_pkg_directories.py
|
| +++ b/dart/tools/list_pkg_directories.py
|
| @@ -3,7 +3,6 @@
|
| # for details. All rights reserved. Use of this source code is governed by a
|
| # BSD-style license that can be found in the LICENSE file.
|
|
|
| -
|
| '''Tool for listing the directories under pkg, with their lib directories.
|
| Used in pkg.gyp. Lists all of the directories in the current directory
|
| which have a lib subdirectory.
|
| @@ -11,7 +10,14 @@ which have a lib subdirectory.
|
| Usage:
|
| python tools/list_pkg_directories.py
|
| '''
|
| +
|
| import os
|
| +import sys
|
| +
|
| +def main(argv):
|
| + paths = map(lambda x: x + '/lib', filter(os.path.isdir, os.listdir(argv[1])))
|
| + for lib in filter(lambda x: os.path.exists(x), paths):
|
| + print lib
|
|
|
| -paths = map(lambda x: x + '/lib', filter(os.path.isdir, os.listdir('.')))
|
| -filter(lambda x: os.path.exists(x), paths)
|
| +if __name__ == '__main__':
|
| + sys.exit(main(sys.argv))
|
|
|