Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-11-08 00:01:31 -0500
committerMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-11-08 09:26:07 -0500
commit5cb78cc47dfc5f8234e502749112f7bce9a816dd (patch)
tree269489e11f55aa847d69fa211b9f0ff5b224ace5 /bin/dslc.in
parent970c3531c55a6b920bcb601d8cdcc6c5953c3729 (diff)
downloadtame-5cb78cc47dfc5f8234e502749112f7bce9a816dd.tar.gz
tame-5cb78cc47dfc5f8234e502749112f7bce9a816dd.tar.bz2
tame-5cb78cc47dfc5f8234e502749112f7bce9a816dd.zip
dslc: Invoke with static rater path
This frees us from requiring a rater/ directory in the working directory. However, it is important that we continue using it if it exists, since there are additional things that haven't yet been moved into the tame repo. * bin/dslc.in: Provide path to rater/ directory. * src/current/src/com/lovullo/dslc/DslCompiler.java: Use provided rater/ path.
Diffstat (limited to 'bin/dslc.in')
-rw-r--r--bin/dslc.in16
1 files changed, 15 insertions, 1 deletions
diff --git a/bin/dslc.in b/bin/dslc.in
index e9dac7c..226ba92 100644
--- a/bin/dslc.in
+++ b/bin/dslc.in
@@ -22,7 +22,21 @@
declare -r mypath=$( dirname "$( readlink -f "$0" )" )
declare -r dslc_jar="$mypath/../src/current/src/dslc.jar"
+# TODO: decouple from old rater/ directory
+rater-path()
+{
+ # use rater/ in cwd if available to maintain previous behavior
+ if [ -d "$(pwd)/rater" ]; then
+ echo "$(pwd)/rater"
+ return
+ fi
+
+ # otherwise use our own
+ echo "$mypath/../rater"
+}
+
CLASSPATH="$CLASSPATH:@DSLC_CLASSPATH@:$dslc_jar" \
"@JAVA@" @JAVA_OPTS@ \
- com.lovullo.dslc.DslCompiler
+ com.lovullo.dslc.DslCompiler \
+ "$( rater-path )"