Roger Meier | 122803b | 2012-06-18 20:23:58 +0000 | [diff] [blame^] | 1 | #!/bin/bash |
2 | |||||
3 | THRIFT_COMPILER=./thrift | ||||
4 | OUTPUT_FOLDER=$PWD | ||||
5 | |||||
6 | if [ ! -e "${THRIFT_COMPILER}" ] | ||||
7 | then | ||||
8 | THRIFT_COMPILER=thrift | ||||
9 | command -v ${THRIFT_COMPILER} >/dev/null 2>&1 | ||||
10 | if [ $? -eq 1 ]; then | ||||
11 | echo | ||||
12 | echo "thrift compiler not found." | ||||
13 | echo | ||||
14 | exit | ||||
15 | fi | ||||
16 | fi | ||||
17 | |||||
18 | ${THRIFT_COMPILER} --gen cpp Sample.thrift | ||||
19 | |||||
20 | echo | ||||
21 | echo "Files have been generated in gen-cpp." | ||||
22 | |||||
23 | exit | ||||
24 |