aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Ball <cjb@laptop.org>2010-04-05 13:05:31 -0400
committerChris Ball <cjb@laptop.org>2010-04-05 13:05:31 -0400
commit033be8f064bc856c55a37574c36600edca1277da (patch)
treec3b3a4f4e9f34be30a9ed0cd6e59eb5f6da506a1
parentc3b6fb9386a4e1cfca02e61c2ea4fb14c6afc7fc (diff)
downloadetherpad-033be8f064bc856c55a37574c36600edca1277da.tar.gz
etherpad-033be8f064bc856c55a37574c36600edca1277da.tar.xz
etherpad-033be8f064bc856c55a37574c36600edca1277da.zip
If fastjar 0.97/0.98 is installed, use jar instead.
Otherwise the build will crash, due to: http://lists.gnu.org/archive/html/fastjar-dev/2009-12/msg00000.html
-rwxr-xr-xetherpad/bin/rebuildjar.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/etherpad/bin/rebuildjar.sh b/etherpad/bin/rebuildjar.sh
index fc05194..e733d6f 100755
--- a/etherpad/bin/rebuildjar.sh
+++ b/etherpad/bin/rebuildjar.sh
@@ -17,8 +17,15 @@
bin/java-version.sh
if [ -z "$JAR" ]; then
- if [ ! -z `which fastjar` ]; then
- JAR=fastjar
+ if [ ! -z $(which fastjar 2>/dev/null) ]; then
+ # http://lists.gnu.org/archive/html/fastjar-dev/2009-12/msg00000.html
+ version=`fastjar --version | grep fastjar | sed 's/.* //g'`
+ if [[ "$version" = "0.97" || "$version" = "0.98" ]]; then
+ echo "fastjar version $version can't build etherpad. Falling back to standard jar."
+ JAR=jar
+ else
+ JAR=fastjar
+ fi
else
JAR=jar
fi