Swagger: AS3 sdk - Included shell script file for as3 library generation

This commit is contained in:
Deepak Michael 2011-08-31 21:21:08 +05:30
parent 2f311849d8
commit 7c7ce85ed7

23
bin/generate-as3-lib.sh Executable file
View File

@ -0,0 +1,23 @@
#!/bin/bash
if [ $# -ne 4 ]
then
echo "Error in $0 - Invalid Argument Count"
echo "Syntax: $0 location_of_service api_key package_name library_root"
exit
fi
echo "" > classpath.txt
for file in `ls lib`;
do echo -n 'lib/' >> classpath.txt;
echo -n $file >> classpath.txt;
echo -n ':' >> classpath.txt;
done
for file in `ls build`;
do echo -n 'build/' >> classpath.txt;
echo -n $file >> classpath.txt;
echo -n ':' >> classpath.txt;
done
export CLASSPATH=$(cat classpath.txt):conf/as3/templates
export JAVA_OPTS="${JAVA_OPTS} -Dproperty=Xmx2g"
java $WORDNIK_OPTS $JAVA_CONFIG_OPTIONS $JAVA_OPTS -cp $CLASSPATH com.wordnik.swagger.codegen.config.as3.As3LibCodeGen "$@"