blob: f1b69f19623218478f3da1912f67df13f29e0ae6 [file] [log] [blame]
#!/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 directory passed in as an
argument to this script which have a lib subdirectory.
python tools/ directory_to_list
import os
import sys
def main(argv):
directory = argv[1]
paths = map(lambda x: x + '/lib', filter(lambda x: os.path.isdir(
os.path.join(directory, x)), os.listdir(directory)))
for lib in filter(lambda x: os.path.exists(os.path.join(directory, x)),
print '%s/%s' % (directory, lib)
if __name__ == '__main__':