summaryrefslogtreecommitdiffstats
path: root/thrift-compile.sh
diff options
context:
space:
mode:
Diffstat (limited to 'thrift-compile.sh')
-rwxr-xr-xthrift-compile.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/thrift-compile.sh b/thrift-compile.sh
index 6c75de1..8eef59b 100755
--- a/thrift-compile.sh
+++ b/thrift-compile.sh
@@ -1,7 +1,8 @@
#!/bin/bash
-if ! thrift --version | grep -q "0\.9\.3"; then
- echo -n "Warning! You should be using Thrift 0.9.3, but you have $(thrift --version), do you still want to continue? [y/N]: "
+WANT_VER="0.17.0"
+if ! thrift --version | grep -qF "$WANT_VER"; then
+ echo -n "Warning! You should be using Thrift $WANT_VER, but you have $(thrift --version), do you still want to continue? [y/N]: "
read choice
if [ "x${choice:0:1}" != "xy" ]; then
echo "Aborting!"
@@ -18,8 +19,8 @@ if thrift --gen java src/main/thrift/bwlp.thrift; then
bn=$(basename "$file")
if [ -e "src/main/java/org/openslx/bwlp/thrift/iface/$bn" ]; then
diff -q \
- <(sed -r 's/_(i|iter|elem|list|map|key|val)[0-9]+/\1x/g;/@Generated/d' "$file") \
- <(sed -r 's/_(i|iter|elem|list|map|key|val)[0-9]+/\1x/g;/@Generated/d' "src/main/java/org/openslx/bwlp/thrift/iface/$bn")
+ <(sed -r 's/_(i|iter|elem|list|map|key|val)[0-9]+/\1x/g;/Autogenerated by|@Generated|@Override/d' "$file") \
+ <(sed -r 's/_(i|iter|elem|list|map|key|val)[0-9]+/\1x/g;/Autogenerated by|@Generated|@Override/d' "src/main/java/org/openslx/bwlp/thrift/iface/$bn")
ret=$?
[ "$ret" = 0 ] && continue
fi