[tor-commits] [tor-ramdisk/master] Add intelligence for determining ARCH

blueness at torproject.org blueness at torproject.org
Wed Jul 30 11:47:23 UTC 2014


commit 93d6462a24721811061ba66092592869bbdac510
Author: Anthony G. Basile <blueness at gentoo.org>
Date:   Wed Jul 30 07:48:41 2014 -0400

    Add intelligence for determining ARCH
---
 build.sh |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/build.sh b/build.sh
index 9393bce..0eaa771 100755
--- a/build.sh
+++ b/build.sh
@@ -22,8 +22,12 @@ set_start()
 
 set_target()
 {
-	[[ "x$TARGET" = "x" ]] && TARGET="x86"
-	[[ "x$TARGET" != "xx86" && "x$TARGET" != "xx86_64" ]] && echo "Unknown ARCH" && exit
+	MYARCH=$(uname -m)
+	case $MYARCH in
+		x86_64) TARGET="x86_64" ;;
+		*86)    TARGET="x86"    ;;
+		*)      echo "Unknown ARCH" && exit ;;
+	esac
 }
 
 ################################################################################



More information about the tor-commits mailing list