aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorAndrew Lewman <andrew@torproject.org>2007-04-23 04:10:52 +0000
committerAndrew Lewman <andrew@torproject.org>2007-04-23 04:10:52 +0000
commitbc0b78bc10876cca576c6b75ee8b39b529a8ad91 (patch)
treeb42e7dbc3ed109124f9e5bf56a105c8fa18bb9d6 /contrib
parent473c266fc2c7ca4b0c5ccd2f37f9af04dddd4920 (diff)
downloadtor-bc0b78bc10876cca576c6b75ee8b39b529a8ad91.tar
tor-bc0b78bc10876cca576c6b75ee8b39b529a8ad91.tar.gz
Include the kqueue update in this branch as well.
svn:r10005
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/osx/Tor22
1 files changed, 22 insertions, 0 deletions
diff --git a/contrib/osx/Tor b/contrib/osx/Tor
index 9e62cf180..26697720f 100755
--- a/contrib/osx/Tor
+++ b/contrib/osx/Tor
@@ -18,6 +18,28 @@ TORGROUP=daemon
TORCMD=$TORDIR/tor
TORLOG=/var/log/tor.log
+## Determine OSX Version
+# map version to name
+if [ -x /usr/bin/sw_vers ]; then
+# This is poor, yet functional. We don't care about the 3rd number in
+# the OS version
+ OSVER=`/usr/bin/sw_vers | grep ProductVersion | cut -f2 | cut -d"." -f1,2`
+ case "$OSVER" in
+ "10.5") OS="leopard" ARCH="universal";;
+ "10.4") OS="tiger" ARCH="universal";;
+ "10.3") OS="panther" ARCH="ppc";;
+ "10.2") OS="jaguar" ARCH="ppc";;
+ "10.1") OS="puma" ARCH="ppc";;
+ "10.0") OS="cheetah" ARCH="ppc";;
+ esac
+else
+ OS="unknown"
+fi
+
+if [ $ARCH != "universal" ]; then
+ export EVENT_NOKQUEUE=1
+fi
+
##
# Tor Service
##