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

Unified Diff: tools/list_pkg_directories.py

Issue 18497012: Add markdown to third_party/pkg (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« pkg/pkg.gyp ('K') | « third_party/pkg/markdown/test/markdown_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/list_pkg_directories.py
diff --git a/tools/list_pkg_directories.py b/tools/list_pkg_directories.py
index 6d015642dbb4dd0db62b33a6f65083f8d79b9691..360a3536775142e1d1a80b53bfed6da97399c874 100644
--- a/tools/list_pkg_directories.py
+++ b/tools/list_pkg_directories.py
@@ -4,20 +4,23 @@
# 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.
+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.
Usage:
- python tools/list_pkg_directories.py
+ python tools/list_pkg_directories.py directory_to_list
'''
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
+ 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)),
+ paths):
+ print os.path.join(directory, lib)
if __name__ == '__main__':
sys.exit(main(sys.argv))
« pkg/pkg.gyp ('K') | « third_party/pkg/markdown/test/markdown_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698