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

Side by Side Diff: build/linux/python_arch.sh

Issue 669069: Detect python version using /usr/lib/libpython$(ver).so.1.0 instead of /usr/b... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 9 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 | « build/common.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2010 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 figures out the architecture of the version of Python we are building 6 # This figures out the architecture of the version of Python we are building
7 # pyautolib against. 7 # pyautolib against.
8 # 8 #
9 # python_arch.sh /usr/bin/python2.5 9 # python_arch.sh /usr/lib/libpython2.5.so.1.0
10 # python_arch.sh /path/to/sysroot/usr/bin/python2.4 10 # python_arch.sh /path/to/sysroot/usr/lib/libpython2.4.so.1.0
11 # 11 #
12 12
13 set -e 13 set -e
14 14
15 python=$(readlink -f "$1") 15 python=$(readlink -f "$1")
16 file_out=$(file "$python") 16 file_out=$(file "$python")
17 17
18 set +e 18 set +e
19 19
20 echo $file_out | grep -qs "ARM" 20 echo $file_out | grep -qs "ARM"
21 if [ $? -eq 0 ]; then 21 if [ $? -eq 0 ]; then
22 echo arm 22 echo arm
23 exit 0 23 exit 0
24 fi 24 fi
25 25
26 echo $file_out | grep -qs "x86-64" 26 echo $file_out | grep -qs "x86-64"
27 if [ $? -eq 0 ]; then 27 if [ $? -eq 0 ]; then
28 echo x64 28 echo x64
29 exit 0 29 exit 0
30 fi 30 fi
31 31
32 echo $file_out | grep -qs "Intel 80386" 32 echo $file_out | grep -qs "Intel 80386"
33 if [ $? -eq 0 ]; then 33 if [ $? -eq 0 ]; then
34 echo ia32 34 echo ia32
35 exit 0 35 exit 0
36 fi 36 fi
37 37
38 exit 1 38 exit 1
OLDNEW
« no previous file with comments | « build/common.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698