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

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

Issue 11819009: [MIPS] Let python_arch script recognize MIPS arch. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 11 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
« no previous file with comments | « no previous file | 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/sh 1 #!/bin/sh
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2011 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/lib/libpython2.5.so.1.0 9 # python_arch.sh /usr/lib/libpython2.5.so.1.0
10 # python_arch.sh /path/to/sysroot/usr/lib/libpython2.4.so.1.0 10 # python_arch.sh /path/to/sysroot/usr/lib/libpython2.4.so.1.0
11 # 11 #
12 12
13 python=$(readlink -f "$1") 13 python=$(readlink -f "$1")
14 if [ ! -r "$python" ]; then 14 if [ ! -r "$python" ]; then
15 echo unknown 15 echo unknown
16 exit 0 16 exit 0
17 fi 17 fi
18 file_out=$(file "$python") 18 file_out=$(file "$python")
19 if [ $? -ne 0 ]; then 19 if [ $? -ne 0 ]; then
20 echo unknown 20 echo unknown
21 exit 0 21 exit 0
22 fi 22 fi
23 23
24 echo $file_out | grep -qs "ARM" 24 echo $file_out | grep -qs "ARM"
25 if [ $? -eq 0 ]; then 25 if [ $? -eq 0 ]; then
26 echo arm 26 echo arm
27 exit 0 27 exit 0
28 fi 28 fi
29 29
30 echo $file_out | grep -qs "MIPS"
31 if [ $? -eq 0 ]; then
32 echo mipsel
33 exit 0
34 fi
35
30 echo $file_out | grep -qs "x86-64" 36 echo $file_out | grep -qs "x86-64"
31 if [ $? -eq 0 ]; then 37 if [ $? -eq 0 ]; then
32 echo x64 38 echo x64
33 exit 0 39 exit 0
34 fi 40 fi
35 41
36 echo $file_out | grep -qs "Intel 80386" 42 echo $file_out | grep -qs "Intel 80386"
37 if [ $? -eq 0 ]; then 43 if [ $? -eq 0 ]; then
38 echo ia32 44 echo ia32
39 exit 0 45 exit 0
40 fi 46 fi
41 47
42 exit 1 48 exit 1
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698