2013-05-06 04:57:14 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
SCRIPT="$0"
|
2014-05-30 22:17:53 +00:00
|
|
|
SCALA_RUNNER_VERSION=2.10 #$(scala ./bin/Version.scala)
|
2013-05-06 04:57:14 +00:00
|
|
|
|
|
|
|
while [ -h "$SCRIPT" ] ; do
|
|
|
|
ls=`ls -ld "$SCRIPT"`
|
|
|
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
|
|
|
if expr "$link" : '/.*' > /dev/null; then
|
|
|
|
SCRIPT="$link"
|
|
|
|
else
|
|
|
|
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ ! -d "${APP_DIR}" ]; then
|
|
|
|
APP_DIR=`dirname "$SCRIPT"`/..
|
|
|
|
APP_DIR=`cd "${APP_DIR}"; pwd`
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd $APP_DIR
|
2013-05-06 05:06:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
# if you've executed sbt assembly previously it will use that instead.
|
2013-05-06 04:57:14 +00:00
|
|
|
ags="com.wordnik.swagger.codegen.ScalaAsyncClientGenerator $@"
|
2013-05-06 05:06:59 +00:00
|
|
|
|
2013-10-18 21:46:03 +00:00
|
|
|
if [ -f $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar ]; then
|
2014-05-30 22:17:53 +00:00
|
|
|
java -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
|
2013-05-06 05:06:59 +00:00
|
|
|
else
|
2013-10-18 21:46:03 +00:00
|
|
|
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
|
2013-05-06 05:06:59 +00:00
|
|
|
fi
|