summaryrefslogtreecommitdiffstats
path: root/thrift-compile.sh
diff options
context:
space:
mode:
Diffstat (limited to 'thrift-compile.sh')
-rwxr-xr-xthrift-compile.sh21
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