Permalink
Browse files

Support for creating big and small releases. Made hubris runner to

include exported classes and read $HUBRIS_LIB directory
  • Loading branch information...
1 parent c416e7b commit 0f919cd6fc4cf2243e96056ca04b23f10bb56c10 @sanel committed Jan 17, 2012
Showing with 13 additions and 3 deletions.
  1. +6 −2 bin/hubris
  2. +7 −1 mk-release.sh
View
8 bin/hubris
@@ -54,19 +54,23 @@ if test "x$HUBRIS_LIB" = "x"; then
fi
if test -d "$HUBRIS_LIB"; then
- export CLASSPATH="$CLASSPATH:`find $HUBRIS_LIB -name "*.jar" | sort | tr '\n' ':'`"
+ CLASSES="$CLASSPATH:`find $HUBRIS_LIB -name "*.jar" | sort | tr '\n' ':'`"
fi
+# resolve what kind of our jar to use; the big one (standalone) or the little one
if test -f $hubris_jar_standalone; then
hubris_jar=$hubris_jar_standalone
else
if test -f $hubris_jar_plain; then
hubris_jar=$hubris_jar_plain
else
echo "Unable to find application jar file. Did you compiled $program???"
+ exit 1
fi
fi
+CLASSES="$CLASSES:$hubris_jar"
+
if test "x$RLWRAP" != "x"; then
[ "x$HUBRIS_DEBUG" = "x1" ] && echo "Using rlwrap..."
COMMAND="$RLWRAP --remember -c -b $breakchars -f $hubris_dir/utils/completions"
@@ -75,4 +79,4 @@ else
COMMAND=""
fi
-$COMMAND java -jar $hubris_jar $clojure_mode
+$COMMAND java -cp $CLASSES hubris.core $clojure_mode
View
8 mk-release.sh
@@ -2,12 +2,18 @@
version=`head -1 project.clj | awk '{print $3}' | sed 's/"//g'`
dir="hubris-$version"
+dir_big="$dir-full"
lein uberjar
+mkdir -p $dir_big
+cp -R bin commands utils hubris-$version-standalone.jar *.md *.html $dir_big
+tar -czpvf $dir_big.tar.gz $dir_big
+
mkdir -p $dir
-cp -R bin commands utils hubris-$version-standalone.jar *.md *.html $dir
+cp -R bin commands utils hubris-$version.jar *.md *.html $dir
tar -czpvf $dir.tar.gz $dir
lein clean
rm -Rf $dir
+rm -Rf $dir_big

0 comments on commit 0f919cd

Please sign in to comment.