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

Unified Diff: third_party/mojo/src/mojo/public/tools/dart_list_packages_contents.py

Issue 1157843002: Update mojo sdk to rev 1dc8a9a5db73d3718d99917fadf31f5fb2ebad4f (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
Index: third_party/mojo/src/mojo/public/tools/dart_list_packages_contents.py
diff --git a/third_party/mojo/src/mojo/public/tools/dart_list_packages_contents.py b/third_party/mojo/src/mojo/public/tools/dart_list_packages_contents.py
index b8fbbdc39e836da872432b4c4cfc6b10484f133f..f6e0d4a3e61f3236d358db45c862c0701609e51e 100755
--- a/third_party/mojo/src/mojo/public/tools/dart_list_packages_contents.py
+++ b/third_party/mojo/src/mojo/public/tools/dart_list_packages_contents.py
@@ -10,11 +10,15 @@ import argparse
import os
import sys
-def main(target_directory):
+def main(target_directory, package_name):
os.chdir(target_directory)
+ self_path = 'packages/' + package_name
for root, _, files in os.walk("packages", followlinks=True):
for f in files:
- print os.path.join(root, f)
+ path = os.path.join(root, f)
+ # Skip the contents of our own packages/package_name symlink.
+ if not path.startswith(self_path):
+ print os.path.join(root, f)
if __name__ == '__main__':
parser = argparse.ArgumentParser(
@@ -27,5 +31,12 @@ if __name__ == '__main__':
required=True,
help="The target directory, specified relative to this "
"directory.")
+ parser.add_argument("--package-name",
+ dest="package_name",
+ metavar="<package-name>",
+ type=str,
+ required=True,
+ help="The name of the package whose packages/ is being "
+ "dumped.")
args = parser.parse_args()
- sys.exit(main(args.target_directory))
+ sys.exit(main(args.target_directory, args.package_name))
« no previous file with comments | « third_party/mojo/src/mojo/public/tools/dart_list_mojoms.py ('k') | third_party/mojo/src/mojo/public/tools/dart_package.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698