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

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rwxr-xr-x

Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 #!/bin/sh
     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
     7 # pyautolib against.
     8 #
     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
    11 #
    13 python=$(readlink -f "$1")
    14 if [ ! -r "$python" ]; then
    15   echo unknown
    16   exit 0
    17 fi
    18 file_out=$(file "$python")
    19 if [ $? -ne 0 ]; then
    20   echo unknown
    21   exit 0
    22 fi
    24 echo $file_out | grep -qs "ARM"
    25 if [ $? -eq 0 ]; then
    26   echo arm
    27   exit 0
    28 fi
    30 echo $file_out | grep -qs "x86-64"
    31 if [ $? -eq 0 ]; then
    32   echo x64
    33   exit 0
    34 fi
    36 echo $file_out | grep -qs "Intel 80386"
    37 if [ $? -eq 0 ]; then
    38   echo ia32
    39   exit 0
    40 fi
    42 exit 1

mercurial