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

Unified Diff: installers/generate_tarball.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/generate_resource_script.py ('k') | installers/installers.manifest » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: installers/generate_tarball.py
diff --git a/installers/generate_tarball.py b/installers/generate_tarball.py
deleted file mode 100644
index f12af596e8288b71c59c0f65226f219b3155d1a1..0000000000000000000000000000000000000000
--- a/installers/generate_tarball.py
+++ /dev/null
@@ -1,49 +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 sys
-import tarfile
-import urllib
-
-TEST_PREFIX = 'TEST_'
-
-def GenerateTarball(output_filename, members):
- """
- Given a tarball name and a sequence of filenames, creates a tarball
- containing the named files.
- """
- tarball = tarfile.open(output_filename, 'w')
- for filename in members:
- # A hacky convention to get around the spaces in filenames is to
- # urlencode them. So at this point we unescape those characters.
- scrubbed_filename = urllib.unquote(os.path.basename(filename))
- if scrubbed_filename.startswith(TEST_PREFIX):
- scrubbed_filename = scrubbed_filename[len(TEST_PREFIX):]
- tarball.add(filename, scrubbed_filename)
- tarball.close()
-
-(opts, args) = getopt.getopt(sys.argv[1:], 'i:o:p:')
-
-output_filename = ''
-
-for (o, v) in opts:
- if o == '-o':
- output_filename = v
-
-GenerateTarball(output_filename, args)
« no previous file with comments | « installers/generate_resource_script.py ('k') | installers/installers.manifest » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698