mirror of
https://github.com/dart-lang/sdk
synced 2024-11-05 18:22:09 +00:00
46c1741645
Review URL: https://codereview.chromium.org//11478021 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15840 260f80e4-7a28-3924-810f-c04153c831b5
23 lines
709 B
Python
23 lines
709 B
Python
#!/usr/bin/env python
|
|
# Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
|
# 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.
|
|
|
|
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
|
|
|
|
if __name__ == '__main__':
|
|
sys.exit(main(sys.argv))
|