summaryrefslogtreecommitdiffstats
path: root/etherpad
diff options
context:
space:
mode:
authorChris Ball <cjb@laptop.org>2009-12-23 20:20:50 -0500
committerChris Ball <cjb@laptop.org>2010-04-05 13:06:18 -0400
commit04669dd33b624a9827e335dff15d99f703ca49f8 (patch)
tree72cc8f137eb6ee26cb29e820e4ed3ca5e6a7ca5d /etherpad
parentd9cdda6e130c30020028c1da2c31c6f4cd72dfd4 (diff)
downloadetherpad-04669dd33b624a9827e335dff15d99f703ca49f8.tar.gz
etherpad-04669dd33b624a9827e335dff15d99f703ca49f8.tar.bz2
etherpad-04669dd33b624a9827e335dff15d99f703ca49f8.zip
Add depschecking; check environment variables are pointing at existing files
Diffstat (limited to 'etherpad')
-rwxr-xr-xetherpad/bin/rebuildjar.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/etherpad/bin/rebuildjar.sh b/etherpad/bin/rebuildjar.sh
index 61f180f..3238163 100755
--- a/etherpad/bin/rebuildjar.sh
+++ b/etherpad/bin/rebuildjar.sh
@@ -31,6 +31,32 @@ if [ -z "$JAR" ]; then
fi
fi
+function depscheck {
+ if [ ! -d "$JAVA_HOME" ]; then
+ echo "\$JAVA_HOME does not point to an existing dir; should be e.g. /usr/java/latest"
+ exit 1
+ fi
+ if [ ! -d "$SCALA_HOME" ]; then
+ echo "\$SCALA_HOME does not point to an existing dir; should be e.g. /usr/share/scala"
+ exit 1
+ fi
+ if [ ! -e "$SCALA" ]; then
+ echo "\$SCALA does not point to an existing file; should be e.g. /usr/bin/scala"
+ exit 1
+ fi
+ if [ ! -e "$JAVA" ]; then
+ echo "\$JAVA does not point to an existing file; should be e.g. /usr/bin/java"
+ exit 1
+ fi
+ if [ ! -e "$MYSQL_CONNECTOR_JAR" ]; then
+ echo "\$MYSQL_CONNECTOR_JAR does not point to an existing file; should be e.g. /usr/share/java/mysql-connector-java.jar"
+ exit 1
+ fi
+
+}
+
+depscheck
+
function notify {
if [ ! -z $(which growlnotify 2>/dev/null) ]; then
echo $0 finished | growlnotify