Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | #!/bin/sh |
michael@0 | 2 | # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
michael@0 | 3 | # Use of this source code is governed by a BSD-style license that can be |
michael@0 | 4 | # found in the LICENSE file. |
michael@0 | 5 | |
michael@0 | 6 | # This figures out the architecture of the version of Python we are building |
michael@0 | 7 | # pyautolib against. |
michael@0 | 8 | # |
michael@0 | 9 | # python_arch.sh /usr/lib/libpython2.5.so.1.0 |
michael@0 | 10 | # python_arch.sh /path/to/sysroot/usr/lib/libpython2.4.so.1.0 |
michael@0 | 11 | # |
michael@0 | 12 | |
michael@0 | 13 | python=$(readlink -f "$1") |
michael@0 | 14 | if [ ! -r "$python" ]; then |
michael@0 | 15 | echo unknown |
michael@0 | 16 | exit 0 |
michael@0 | 17 | fi |
michael@0 | 18 | file_out=$(file "$python") |
michael@0 | 19 | if [ $? -ne 0 ]; then |
michael@0 | 20 | echo unknown |
michael@0 | 21 | exit 0 |
michael@0 | 22 | fi |
michael@0 | 23 | |
michael@0 | 24 | echo $file_out | grep -qs "ARM" |
michael@0 | 25 | if [ $? -eq 0 ]; then |
michael@0 | 26 | echo arm |
michael@0 | 27 | exit 0 |
michael@0 | 28 | fi |
michael@0 | 29 | |
michael@0 | 30 | echo $file_out | grep -qs "x86-64" |
michael@0 | 31 | if [ $? -eq 0 ]; then |
michael@0 | 32 | echo x64 |
michael@0 | 33 | exit 0 |
michael@0 | 34 | fi |
michael@0 | 35 | |
michael@0 | 36 | echo $file_out | grep -qs "Intel 80386" |
michael@0 | 37 | if [ $? -eq 0 ]; then |
michael@0 | 38 | echo ia32 |
michael@0 | 39 | exit 0 |
michael@0 | 40 | fi |
michael@0 | 41 | |
michael@0 | 42 | exit 1 |