Skip to content

Commit 8d74029

Browse files
committed
Merge pull request #170 from hsanjuan/master
Issue #168: Let runscala.sh run from everywhere without breaking
2 parents a419660 + 809cb5c commit 8d74029

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/runscala.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/bin/sh
22

33
SCRIPT="$0"
4-
SCALA_RUNNER_VERSION=$(scala ./bin/Version.scala)
54

65
while [ -h "$SCRIPT" ] ; do
76
ls=`ls -ld "$SCRIPT"`
@@ -19,14 +18,15 @@ if [ ! -d "${APP_DIR}" ]; then
1918
fi
2019

2120
cd $APP_DIR
21+
SCALA_RUNNER_VERSION=$(scala ./bin/Version.scala)
2222

2323

2424
# if you've executed sbt assembly previously it will use that instead.
2525
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
2626
ags="$@"
2727

2828
if [ -f $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar ]; then
29-
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
29+
scala -cp $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
3030
else
3131
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
3232
fi

0 commit comments

Comments
 (0)