[tor-commits] [tor-browser-bundle/master] Detect 32bit vs 64bit in start-tor-browser
mikeperry at torproject.org
mikeperry at torproject.org
Wed Aug 7 00:34:37 UTC 2013
commit e0ab9b23bff438b57597d78e2dc011e36bd1629d
Author: Mo <moritz at torservers.net>
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
More information about the tor-commits
mailing list