Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 36 lines (27 sloc) 0.823 kb
#!/bin/bash -e
PROJECT=four
JAR=$PROJECT.jar
JAR_PG=$PROJECT-pg.jar
CLOJURE_VERSION=1.5.0-alpha4
CLOJURE_JAR=~/.m2/repository/org/clojure/clojure/$CLOJURE_VERSION/clojure-$CLOJURE_VERSION.jar
rm -rf target
lein jar
cd target
echo "-injars $JAR" >> conf.pro
echo "-outjars $JAR_PG" >> conf.pro
echo "-libraryjars <java.home>/lib/rt.jar" >> conf.pro
echo "-libraryjars $CLOJURE_JAR" >> conf.pro
echo "-keep public class $PROJECT {public static void main(java.lang.String[]);}" >> conf.pro
java -cp `lein classpath` proguard.ProGuard @conf.pro
mv $JAR $PROJECT-leiningen.jar
mv $JAR_PG $JAR
cp -a ../resources/META-INF .
zip -qrD $JAR META-INF
pack200 -r $JAR
SIZE=`ls -l $JAR | awk '{print $5}'`
echo "$JAR $SIZE"
if [ $SIZE -gt 4096 ]; then
echo "$JAR is too big"
exit 1
fi
java -cp $CLOJURE_JAR:$JAR $PROJECT
Jump to Line
Something went wrong with that request. Please try again.