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

Unified Diff: mojo/public/tools/prepend.py

Issue 814543006: Move //mojo/{public, edk} underneath //third_party (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 11 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 | « mojo/public/tools/download_shell_binary.py ('k') | mojo/services/html_viewer/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/tools/prepend.py
diff --git a/mojo/public/tools/prepend.py b/mojo/public/tools/prepend.py
deleted file mode 100755
index de70a82cf6cf0c5289dd5b081ee40fbe9b6bd502..0000000000000000000000000000000000000000
--- a/mojo/public/tools/prepend.py
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2014 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.
-
-"""
-Prepends a given file with a given line. This can be used to add a shebang line
-to a generated file.
-"""
-
-import optparse
-import os
-import shutil
-import sys
-
-
-def main():
- parser = optparse.OptionParser()
- parser.add_option('--input', help='The file to prepend the line to.')
- parser.add_option('--line', help='The line to be prepended.')
- parser.add_option('--output', help='The output file.')
-
- options, _ = parser.parse_args()
- input_path = options.input
- output_path = options.output
- line = options.line
-
- # Warning - this reads all of the input file into memory.
- with open(output_path, 'w') as output_file:
- output_file.write(line + '\n')
- with open(input_path, 'r') as input_file:
- shutil.copyfileobj(input_file, output_file)
-
-
-if __name__ == '__main__':
- sys.exit(main())
« no previous file with comments | « mojo/public/tools/download_shell_binary.py ('k') | mojo/services/html_viewer/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698