Last active
August 29, 2015 14:01
-
-
Save navicore/9d2d833e36f644bef90b to your computer and use it in GitHub Desktop.
bash to build classpath from directory of jars
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
PROJECT_DIR="$(cd `dirname $0`; pwd)" | |
PROJECT_JAR="none" | |
for entry in "build/libs"/* | |
do | |
PROJECT_JAR=$entry | |
echo "running $entry" | |
break | |
done | |
CLASSPATH+=:$PROJECT_JAR | |
for jar in `find $PROJECT_DIR/build/dist -name '*jar'`; do | |
CLASSPATH+=:$jar | |
done | |
#java $JAVA_OPTS -jar $PROJECT_JAR -c -t $1 -B localhost:9092 | |
java -cp $CLASSPATH $JAVA_OPTS my.package.Main -c -t $1 -B localhost:9092 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment