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

Unified Diff: installers/generate_resource_script.py

Issue 624713003: Keep only base/extractor.[cc|h]. (Closed) Base URL: https://chromium.googlesource.com/external/omaha.git@master
Patch Set: Created 6 years, 2 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 | « installers/build_metainstaller.py ('k') | installers/generate_tarball.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: installers/generate_resource_script.py
diff --git a/installers/generate_resource_script.py b/installers/generate_resource_script.py
deleted file mode 100644
index d755fc1f4ebe0dcb460b6f43b0550aae177c1494..0000000000000000000000000000000000000000
--- a/installers/generate_resource_script.py
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/usr/bin/python2.4
-#
-# Copyright 2009 Google Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ========================================================================
-
-import getopt
-import os.path
-import re
-import sys
-
-def GenerateResourceScript(input_filename, output_filename, payload_filename,
- manifest_filename, resource_filename):
- """
- Given a template name, output filename, payload filename, manifest filename,
- and resource_filename, and creates a resource script.
- """
- f_int = open(input_filename, 'r')
- f_out = open(output_filename, 'w')
-
- for line in f_int.readlines():
- f_out.write(re.sub(r'__RESOURCE_FILENAME__', resource_filename,
- re.sub(r'__MANIFEST_FILENAME__', manifest_filename,
- re.sub(r'__PAYLOAD_FILENAME__', payload_filename, line))))
-
-(opts, args) = getopt.getopt(sys.argv[1:], 'i:o:p:m:r:')
-
-input_filename = ''
-output_filename = ''
-payload_filename = ''
-manifest_filename = ''
-resource_filename = ''
-
-for (o, v) in opts:
- if o == '-i':
- input_filename = v
- if o == '-o':
- output_filename = v
- if o == '-p':
- payload_filename = v
- if o == '-m':
- manifest_filename = v
- if o == '-r':
- resource_filename = v
-
-# The forward slashes prevent the RC compiler from trying to interpret
-# backslashes in the quoted path.
-GenerateResourceScript(input_filename, output_filename,
- re.sub(r'\\', r'/', payload_filename),
- re.sub(r'\\', r'/', manifest_filename),
- re.sub(r'\\', r'/', resource_filename))
« no previous file with comments | « installers/build_metainstaller.py ('k') | installers/generate_tarball.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698