wilfrem | 2c69b5a | 2015-04-20 19:24:50 +0900 | [diff] [blame] | 1 | #! /bin/sh |
| 2 | |
| 3 | DIR="$( cd "$( dirname "$0" )" && pwd )" |
| 4 | |
| 5 | mkdir -p $DIR/../test-compiled |
| 6 | |
| 7 | COMPILEDDIR="$(cd $DIR && cd ../test-compiled && pwd)" |
| 8 | export NODE_PATH="${DIR}:${DIR}/../../nodejs/lib:${NODE_PATH}" |
| 9 | |
| 10 | compile() |
| 11 | { |
| 12 | #generating thrift code |
Jens Geyer | f066d84 | 2022-06-13 23:37:25 +0200 | [diff] [blame] | 13 | ${DIR}/../../../compiler/cpp/thrift -o ${DIR} --gen js:node,ts ${DIR}/../../../test/v0.16/ThriftTest.thrift |
| 14 | ${DIR}/../../../compiler/cpp/thrift -o ${COMPILEDDIR} --gen js:node,ts ${DIR}/../../../test/v0.16/ThriftTest.thrift |
wilfrem | 2c69b5a | 2015-04-20 19:24:50 +0900 | [diff] [blame] | 15 | } |
| 16 | compile |
| 17 | |
| 18 | node ${COMPILEDDIR}/client.js $* |