added scripts

This commit is contained in:
Tony Tam
2014-09-19 16:36:28 -07:00
parent 134c900aa1
commit 7630fd4f85
2 changed files with 52 additions and 0 deletions

26
bin/java-petstore-filemap.sh Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/sh
SCRIPT="$0"
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
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="$@ com.wordnik.swagger.codegen.Codegen -i src/test/resources/petstore.json -l java"
java -cp $APP_DIR/target/*:$APP_DIR/target/lib/* $ags

26
bin/objc-petstore.sh Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/sh
SCRIPT="$0"
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
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="$@ com.wordnik.swagger.codegen.Codegen -i src/test/resources/petstore.json -l objc"
java -cp $APP_DIR/target/*:$APP_DIR/target/lib/* $ags