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
4 # found in the LICENSE file.
6 # This figures out the architecture of the version of Python we are building
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
13 file_out
=$
(file --dereference "$1")
19 echo $file_out |
grep -qs "ARM"
25 echo $file_out |
grep -qs "MIPS"
31 echo $file_out |
grep -qs "x86-64"
37 echo $file_out |
grep -qs "Intel 80386"