From f3009e48c7b1cde00da44b8af2159278e2394a6a Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 16 Nov 2012 10:28:19 -0500 Subject: [PATCH] Make rpcgen_wrapper.sh work on systems without a "python2" binary --- test/rpcgen_wrapper.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/rpcgen_wrapper.sh b/test/rpcgen_wrapper.sh index a60331c9..d2101b05 100755 --- a/test/rpcgen_wrapper.sh +++ b/test/rpcgen_wrapper.sh @@ -26,9 +26,17 @@ exit_failed() { exit 1 } +if [ -x /usr/bin/python2 ] ; then + PYTHON2=/usr/bin/python2 +elif [ "x`which python2`" != x ] ; then + PYTHON2=python2 +else + PYTHON2=python +fi + srcdir=$1 srcdir=${srcdir:-.} -${srcdir}/../event_rpcgen.py ${srcdir}/regress.rpc +${PYTHON2} ${srcdir}/../event_rpcgen.py ${srcdir}/regress.rpc case "$?" in 0) exit_updated