[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor-browser-bundle/master] Detect 32bit vs 64bit in start-tor-browser
commit e0ab9b23bff438b57597d78e2dc011e36bd1629d
Author: Mo <moritz@xxxxxxxxxxxxxx>
Date: Wed Aug 7 02:33:45 2013 +0200
Detect 32bit vs 64bit in start-tor-browser
Linux only for now.
---
RelativeLink/RelativeLink.sh | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/RelativeLink/RelativeLink.sh b/RelativeLink/RelativeLink.sh
index a461fde..8d8c732 100755
--- a/RelativeLink/RelativeLink.sh
+++ b/RelativeLink/RelativeLink.sh
@@ -116,6 +116,14 @@ if [ "`id -u`" -eq 0 ]; then
exit 1
fi
+SYSARCHITECTURE=$(getconf LONG_BIT)
+TORARCHITECTURE=$(expr "$(file App/tor)" : '.*ELF \([[:digit:]]*\)')
+
+if [ $SYSARCHITECTURE -ne $TORARCHITECTURE ]; then
+ complain "Wrong architecture? 32-bit vs. 64-bit."
+ exit 1
+fi
+
debug=0
usage_message="usage: $0 [--debug]"
if [ "$#" -eq 1 -a \( "x$1" = "x--debug" -o "x$1" = "x-debug" \) ]; then
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits