blob: 9ace915db9b3a5dea26a5dce684984bebe2a3a1b [file] [log] [blame]
Nicolas "Pixel" Noble2d862632016-03-03 23:25:22 +01001#!/bin/sh
2
Jan Tattermusch7897ae92017-06-07 22:57:36 +02003# Copyright 2016 gRPC authors.
Nicolas "Pixel" Noble2d862632016-03-03 23:25:22 +01004#
Jan Tattermusch7897ae92017-06-07 22:57:36 +02005# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
Nicolas "Pixel" Noble2d862632016-03-03 23:25:22 +01008#
Jan Tattermusch7897ae92017-06-07 22:57:36 +02009# http://www.apache.org/licenses/LICENSE-2.0
Nicolas "Pixel" Noble2d862632016-03-03 23:25:22 +010010#
Jan Tattermusch7897ae92017-06-07 22:57:36 +020011# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
Nicolas "Pixel" Noble2d862632016-03-03 23:25:22 +010016
17for p in python2.7 python2.6 python2 python not_found ; do
18
19 python=`which $p || echo not_found`
20
21 if [ -x "$python" ] ; then
22 break
23 fi
24
25done
26
27if [ -x "$python" ] ; then
28 exec $python $@
29else
30 echo "No acceptable version of python found on the system"
31 exit 1
32fi