From 7951bb92074d58feef3682e9ee89237b0dc8440f Mon Sep 17 00:00:00 2001
From: Mikko Rantalainen <mikko.rantalainen@peda.net>
Date: Wed, 5 May 2010 16:51:40 +0300
Subject: Make scala library JAR location configurable

scala-library.jar may be in $SCALA_HOME/lib or in $SCALA_HOME.
Make it possible to point directly to scala-library.jar anywhere.
---
 bin/build.sh                  | 5 +++--
 infrastructure/bin/makejar.sh | 4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/bin/build.sh b/bin/build.sh
index 3e42c96..7aa70e3 100755
--- a/bin/build.sh
+++ b/bin/build.sh
@@ -25,8 +25,9 @@
 # You have to change following lines to your requirements:
 #
 export JAVA_HOME="/usr/lib/jvm/java-6-sun/"
-export SCALA_HOME=/usr/share/java
-export MYSQL_CONNECTOR_JAR=/usr/share/java/mysql-connector-java.jar
+export SCALA_HOME="/usr/share/java"
+export SCALA_LIBRARY_JAR="/usr/share/java/scala-library.jar"
+export MYSQL_CONNECTOR_JAR="/usr/share/java/mysql-connector-java.jar"
 export JAVA="/usr/lib/jvm/java-6-sun/bin/java"
 export SCALA="/usr/bin/scala"
 export PATH="/usr/lib/jvm/java-6-sun/bin:$PATH"
diff --git a/infrastructure/bin/makejar.sh b/infrastructure/bin/makejar.sh
index feace68..46b4609 100755
--- a/infrastructure/bin/makejar.sh
+++ b/infrastructure/bin/makejar.sh
@@ -32,11 +32,11 @@ fi
 
 TMPSTORE=/tmp/ajbuild-tmpstore-`date +%s`
 
-JARFILES=`echo $SCALA_HOME/scala-library.jar lib/*.jar lib/manifest`
+JARFILES=`echo $SCALA_LIBRARY_JAR lib/*.jar lib/manifest`
 function genjar {
     echo "unzipping JARs..."
     pushd $1 >> /dev/null
-    $JAR xf $SCALA_HOME/scala-library.jar
+    $JAR xf $SCALA_LIBRARY_JAR
     rm -rf META-INF
     for a in ../../lib/*.jar; do
 	$JAR xf $a
-- 
cgit v1.2.3