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

Side by Side Diff: build/extract_from_cab.py

Issue 3067008: Touch extracted D3DX9 dll in extract_d3dx9 action.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/chrome.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # Copyright (c) 2009 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 # Extracts a single file from a CAB archive.
7
8 import os
9 import subprocess
10 import sys
11
12 if len(sys.argv) != 4:
13 print "Usage: extract_from_cab.py cab_path archived_file output_dir"
bradn 2010/07/28 18:07:01 Style guide says use consistent " or ' throughout.
14 sys.exit(1)
15
16 [cab_path, archived_file, output_dir] = sys.argv[1:]
17
18 # Invoke the Windows expand utility to extract the file.
19 level = subprocess.call(['expand', cab_path, '-F:' + archived_file, output_dir])
20 if level != 0:
21 sys.exit(level)
22
23 # The expand utility preserves the modification date and time of the archived
24 # file. Touch the extracted file. This helps build systems that compare the
25 # modification times of input and output files to determine whether to do an
26 # action.
27 os.utime(os.path.join(output_dir, archived_file), None)
28
29 sys.exit(0)
bradn 2010/07/28 18:07:01 It defaults to this, so you can drop it.
OLDNEW
« no previous file with comments | « no previous file | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698