australis/vendor/git.apache.org/thrift.git/contrib/transport-sample/thriftme.sh
2018-10-23 23:32:59 -07:00

24 lines
381 B
Bash

#!/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