media/webrtc/trunk/build/linux/python_arch.sh

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/media/webrtc/trunk/build/linux/python_arch.sh	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,42 @@
     1.4 +#!/bin/sh
     1.5 +# Copyright (c) 2011 The Chromium Authors. All rights reserved.
     1.6 +# Use of this source code is governed by a BSD-style license that can be
     1.7 +# found in the LICENSE file.
     1.8 +
     1.9 +# This figures out the architecture of the version of Python we are building
    1.10 +# pyautolib against.
    1.11 +#
    1.12 +#  python_arch.sh /usr/lib/libpython2.5.so.1.0
    1.13 +#  python_arch.sh /path/to/sysroot/usr/lib/libpython2.4.so.1.0
    1.14 +#
    1.15 +
    1.16 +python=$(readlink -f "$1")
    1.17 +if [ ! -r "$python" ]; then
    1.18 +  echo unknown
    1.19 +  exit 0
    1.20 +fi
    1.21 +file_out=$(file "$python")
    1.22 +if [ $? -ne 0 ]; then
    1.23 +  echo unknown
    1.24 +  exit 0
    1.25 +fi
    1.26 +
    1.27 +echo $file_out | grep -qs "ARM"
    1.28 +if [ $? -eq 0 ]; then
    1.29 +  echo arm
    1.30 +  exit 0
    1.31 +fi
    1.32 +
    1.33 +echo $file_out | grep -qs "x86-64"
    1.34 +if [ $? -eq 0 ]; then
    1.35 +  echo x64
    1.36 +  exit 0
    1.37 +fi
    1.38 +
    1.39 +echo $file_out | grep -qs "Intel 80386"
    1.40 +if [ $? -eq 0 ]; then
    1.41 +  echo ia32
    1.42 +  exit 0
    1.43 +fi
    1.44 +
    1.45 +exit 1

mercurial