summaryrefslogtreecommitdiffstats
path: root/src/jaegertracing/thrift/contrib/transport-sample/thriftme.sh
blob: 3b18f909e1c6bb05c046c0ceeeae11d7ecb4804c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash

THRIFT_COMPILER=./thrift
OUTPUT_FOLDER=$PWD

if [ ! -e "${THRIFT_COMPILER}" ]
then
   THRIFT_COMPILER=thrift
   command -v  ${THRIFT_COMPILER} >/dev/null 2>&1
   if [ $? -eq 1 ]; then
      echo
      echo "thrift compiler not found."
      echo
      exit
   fi
fi

${THRIFT_COMPILER} --gen cpp Sample.thrift

echo
echo "Files have been generated in gen-cpp."

exit