diff options
Diffstat (limited to 'build/linux/.svn/text-base/python_arch.sh.svn-base')
-rw-r--r-- | build/linux/.svn/text-base/python_arch.sh.svn-base | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/build/linux/.svn/text-base/python_arch.sh.svn-base b/build/linux/.svn/text-base/python_arch.sh.svn-base new file mode 100644 index 0000000..f364469 --- /dev/null +++ b/build/linux/.svn/text-base/python_arch.sh.svn-base @@ -0,0 +1,42 @@ +#!/bin/bash +# Copyright (c) 2010 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# This figures out the architecture of the version of Python we are building +# pyautolib against. +# +# python_arch.sh /usr/lib/libpython2.5.so.1.0 +# python_arch.sh /path/to/sysroot/usr/lib/libpython2.4.so.1.0 +# + +python=$(readlink -f "$1") +if [ ! -r "$python" ]; then + echo unknown + exit 0; +fi +file_out=$(file "$python") +if [ $? -ne 0 ]; then + echo unknown + exit 0; +fi + +echo $file_out | grep -qs "ARM" +if [ $? -eq 0 ]; then + echo arm + exit 0 +fi + +echo $file_out | grep -qs "x86-64" +if [ $? -eq 0 ]; then + echo x64 + exit 0 +fi + +echo $file_out | grep -qs "Intel 80386" +if [ $? -eq 0 ]; then + echo ia32 + exit 0 +fi + +exit 1 |