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

Side by Side Diff: build/linux/install-debian.wheezy.sysroot.wrapper.py

Issue 15059002: Convert build/linux/install-debian.wheezy.sysroot.wrapper.sh to python for Windows compatibility. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: remove unused variable Created 7 years, 7 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 | « DEPS ('k') | build/linux/install-debian.wheezy.sysroot.wrapper.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/sh 1 #!/usr/bin/env python
2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 # This wrapper script runs the Debian sysroot installation scripts, if they 6 # This wrapper script runs the Debian sysroot installation scripts, if they
7 # exist. 7 # exist.
8 # 8 #
9 # The script is a no-op except for linux users who have the following in their 9 # The script is a no-op except for linux users who have the following in their
10 # GYP_DEFINES: 10 # GYP_DEFINES:
11 # 11 #
12 # * branding=Chrome 12 # * branding=Chrome
13 # * buildtype=Official 13 # * buildtype=Official
14 # * target_arch=[matching_arch] 14 # * target_arch=[matching_arch]
15 # 15 #
16 # and not: 16 # and not:
17 # 17 #
18 # * chromeos=1 18 # * chromeos=1
19 19
20 set -e 20 import os.path
21 import subprocess
Dan Beam 2013/05/08 08:33:30 not sure if we're supposed to be using subproccess
Lei Zhang 2013/05/08 08:42:10 Isn't subprocess2 in depot_tools? Everything in sr
Dan Beam 2013/05/08 09:06:47 ah, ok, ignore me then
22 import sys
21 23
22 SRC_DIR="$(dirname "$0")/../../" 24 def main():
23 SCRIPT_DIR="chrome/installer/linux/internal/sysroot_scripts/" 25 if sys.platform != 'linux2':
24 SCRIPT_FILE="$SRC_DIR/$SCRIPT_DIR/install-debian.wheezy.sysroot.py" 26 return 0
25 27
26 if [ -e "$SCRIPT_FILE" ]; then 28 SRC_DIR = os.path.dirname(os.path.dirname(os.path.dirname(
27 python "$SCRIPT_FILE" --linux-only --arch=amd64 29 os.path.realpath(__file__))))
Dan Beam 2013/05/08 08:33:30 this is slightly hacky, but not the end of the wor
28 python "$SCRIPT_FILE" --linux-only --arch=i386 30 SCRIPT_FILE = os.path.join(SRC_DIR,
29 fi 31 'chrome',
32 'installer',
33 'linux',
34 'internal',
35 'sysroot_scripts',
36 'install-debian.wheezy.sysroot.py')
37 if os.path.exists(SCRIPT_FILE):
Dan Beam 2013/05/08 08:33:30 is it OK that the file doesn't exist?
Lei Zhang 2013/05/08 08:42:10 Yes, see the bash script this converts from.
38 ret = subprocess.call([SCRIPT_FILE, '--linux-only', '--arch=amd64'])
Dan Beam 2013/05/08 08:33:30 most of the scripts I've seen use .communicate to
Lei Zhang 2013/05/08 08:42:10 We don't need to process the output.
39 if ret != 0:
40 return ret
41 ret = subprocess.call([SCRIPT_FILE, '--linux-only', '--arch=i386'])
42 if ret != 0:
43 return ret
44 return 0
45
46 if __name__ == '__main__':
47 sys.exit(main())
OLDNEW
« no previous file with comments | « DEPS ('k') | build/linux/install-debian.wheezy.sysroot.wrapper.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698