diff options
author | Chris Ball <cjb@laptop.org> | 2009-12-23 20:20:50 -0500 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2010-04-05 13:06:18 -0400 |
commit | 04669dd33b624a9827e335dff15d99f703ca49f8 (patch) | |
tree | 72cc8f137eb6ee26cb29e820e4ed3ca5e6a7ca5d | |
parent | d9cdda6e130c30020028c1da2c31c6f4cd72dfd4 (diff) | |
download | etherpad-04669dd33b624a9827e335dff15d99f703ca49f8.tar.gz etherpad-04669dd33b624a9827e335dff15d99f703ca49f8.tar.xz etherpad-04669dd33b624a9827e335dff15d99f703ca49f8.zip |
Add depschecking; check environment variables are pointing at existing files
-rwxr-xr-x | etherpad/bin/rebuildjar.sh | 26 |
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 |