travis-ci: Build C/C++/Python matrix
[apps/agl-service-can-low-level.git] / generator / protoc-gen-nanopb
index 90be6a5..6dc468d 100755 (executable)
@@ -9,4 +9,6 @@
 # path is already set up properly and there is no need to give
 # --plugin= on the command line.
 
-exec python $(dirname $0)/nanopb_generator.py --protoc-plugin
+MYPATH=$(dirname "$0")
+PYTHON=$(which python2 || which python)
+exec $PYTHON "$MYPATH/nanopb_generator.py" --protoc-plugin