diff options
author | Simon Rettberg | 2015-02-19 16:37:22 +0100 |
---|---|---|
committer | Simon Rettberg | 2015-02-19 16:37:22 +0100 |
commit | e225a1481fbf301284a489f81e9325d8273f9c3f (patch) | |
tree | 4d11477024b84252f68c4af78fcd6ee2ede59df8 /thrift-compile.sh | |
parent | Refine proxy setup (diff) | |
download | master-sync-shared-e225a1481fbf301284a489f81e9325d8273f9c3f.tar.gz master-sync-shared-e225a1481fbf301284a489f81e9325d8273f9c3f.tar.xz master-sync-shared-e225a1481fbf301284a489f81e9325d8273f9c3f.zip |
Move dozmod/sat thrift RPC to this lib
Diffstat (limited to 'thrift-compile.sh')
-rwxr-xr-x | thrift-compile.sh | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/thrift-compile.sh b/thrift-compile.sh index d9a0428..82822fd 100755 --- a/thrift-compile.sh +++ b/thrift-compile.sh @@ -9,13 +9,28 @@ if ! thrift --version | grep -q "0\.9\.1"; then fi echo "OK, compiling..." fi + +echo "1) Masterserver RPC" [ -e gen-java ] && rm -r gen-java if thrift --gen java src/main/thrift/imagemaster.thrift; then [ -e "src/main/java/org/openslx/imagemaster/thrift/iface" ] && rm -rf src/main/java/org/openslx/imagemaster/thrift/iface - cp -r gen-java/org src/main/java/ && echo "Success." && exit 0 + if ! cp -r gen-java/org src/main/java/; then + echo "Error copying compiled files! Aborting!" + exit 1 + fi +fi + +echo "2) Sat RPC" +[ -e gen-java ] && rm -r gen-java +if thrift --gen java src/main/thrift/sat.thrift; then + [ -e "src/main/java/org/openslx/sat/thrift/iface" ] && rm -rf src/main/java/org/openslx/sat/thrift/iface + if ! cp -r gen-java/org src/main/java/; then + echo "Error copying compiled files! Aborting!" + exit 1 + fi fi -echo "Error!" -exit 1 +echo "All done!" +exit 0 |