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

Unified Diff: mojo/tools/generate_mojo_shell_assets_list.py

Issue 1492963004: GN: asset_location -> android_assets() for mandoline_apk (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@build_config_java_binary
Patch Set: Created 5 years 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 | « mojo/runner/host/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/tools/generate_mojo_shell_assets_list.py
diff --git a/mojo/tools/generate_mojo_shell_assets_list.py b/mojo/tools/generate_mojo_shell_assets_list.py
deleted file mode 100755
index 1018e943c8ecedca033e214397ae488f03178892..0000000000000000000000000000000000000000
--- a/mojo/tools/generate_mojo_shell_assets_list.py
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-'''Generates the assets_list file from a directory.'''
-
-import argparse
-import os
-import sys
-
-def main():
- parser = argparse.ArgumentParser(usage='--dir <directory>')
-
- parser.add_argument('--dir', help='Directory read files from.', required=True)
-
- options, _ = parser.parse_known_args()
-
- if not os.path.exists(options.dir) or not os.path.isdir(options.dir):
- print 'Directory does not exist, or path is not a directory', options.dir
- return -1
-
- root_dir = os.path.abspath(options.dir)
- all_files = []
- for current_root, _, files in os.walk(options.dir):
- current_root_absolute = os.path.abspath(current_root)
- if len(current_root_absolute) < len(root_dir):
- print 'unexpected directory', current_root_absolute
- return -1
- rel_root = current_root_absolute[len(root_dir):]
- if len(rel_root) and rel_root.startswith(os.sep):
- rel_root = rel_root[len(os.sep):]
- if len(rel_root) and not rel_root.endswith(os.sep):
- rel_root += os.sep
- all_files.extend([rel_root + f for f in files])
-
- with open(os.path.join(options.dir, 'assets_list'), 'w') as f:
- for a_file in all_files:
- f.write(a_file + '\n')
-
- return 0
-
-if __name__ == '__main__':
- sys.exit(main())
-
« no previous file with comments | « mojo/runner/host/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698