Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: tools/list_pkg_directories.py

Issue 350483003: Build Tools Cleanup (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: more fixes as reviewed by ricow Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/list_files.py ('k') | tools/make_links.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
5 5
6 '''Tool for listing the directories under pkg, with their lib directories. 6 """Tool for listing the directories under pkg, with their lib directories.
7 Used in pkg.gyp. Lists all of the directories in the directory passed in as an 7 Used in pkg.gyp. Lists all of the directories in the directory passed in as an
8 argument to this script which have a lib subdirectory. 8 argument to this script which have a lib subdirectory.
9 9
10 Usage: 10 Usage:
11 python tools/list_pkg_directories.py directory_to_list 11 python tools/list_pkg_directories.py directory_to_list
12 ''' 12 """
13 13
14 import os 14 import os
15 import sys 15 import sys
16 16
17 def main(argv): 17 def main(argv):
18 directory = argv[1] 18 directory = argv[1]
19 paths = map(lambda x: x + '/lib', filter(lambda x: os.path.isdir( 19 paths = map(lambda x: x + '/lib', filter(lambda x: os.path.isdir(
20 os.path.join(directory, x)), os.listdir(directory))) 20 os.path.join(directory, x)), os.listdir(directory)))
21 for lib in filter(lambda x: os.path.exists(os.path.join(directory, x)), 21 for lib in filter(lambda x: os.path.exists(os.path.join(directory, x)),
22 paths): 22 paths):
23 print '%s/%s' % (directory, lib) 23 print '%s/%s' % (directory, lib)
24 24
25 if __name__ == '__main__': 25 if __name__ == '__main__':
26 sys.exit(main(sys.argv)) 26 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « tools/list_files.py ('k') | tools/make_links.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698