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

Unified Diff: third_party/liblouis/liblouis_list_tables.py

Issue 1145243006: Port chromevox build to GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@externs
Patch Set: Workaround hardlink related spuroius rebuild issue by using a stamp file (not ideal). Created 5 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
« no previous file with comments | « third_party/liblouis/copy_tables.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/liblouis/liblouis_list_tables.py
diff --git a/third_party/liblouis/liblouis_list_tables.py b/third_party/liblouis/liblouis_list_tables.py
index 9cd3fb8b9ac8355fd387d19a823eceee27ab9309..62834003fed0d89e2dc3915468d0c88a1b269527 100755
--- a/third_party/liblouis/liblouis_list_tables.py
+++ b/third_party/liblouis/liblouis_list_tables.py
@@ -59,6 +59,17 @@ def ProcessFile(output_set, filename, directories):
ProcessFile(output_set, include_file, directories)
+def GetTableFiles(tables_file, directories, extra_files):
+ tables = LoadTablesFile(tables_file)
+ output_set = set()
+ for table in tables:
+ for name in table['fileNames'].split(','):
+ ProcessFile(output_set, name, directories)
+ for name in extra_files:
+ ProcessFile(output_set, name, directories)
+ return output_set
+
+
def DoMain(argv):
"Entry point for gyp's pymod_do_main command."
parser = optparse.OptionParser()
@@ -75,15 +86,8 @@ def DoMain(argv):
parser.error('Expecting exactly one argument')
if not options.directories:
parser.error('At least one --directory option must be specified')
-
- tables = LoadTablesFile(args[0])
- output_set = set()
- for table in tables:
- for name in table['fileNames'].split(','):
- ProcessFile(output_set, name, options.directories)
- for name in options.extra_files:
- ProcessFile(output_set, name, options.directories)
- return '\n'.join(output_set)
+ files = GetTableFiles(args[0], options.directories, options.extra_files)
+ return '\n'.join(files)
def main(argv):
« no previous file with comments | « third_party/liblouis/copy_tables.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698