Skip to content

Commit

Permalink
Fix demo script broken with modular build (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed Dec 21, 2016
1 parent e5dbf83 commit a5f0f19
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions demo/jline-gogo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,27 @@ REALNAME=$(realpath "$0")
DIRNAME=$(dirname "${REALNAME}")
PROGNAME=$(basename "${REALNAME}")
ROOTDIR=${DIRNAME}/..
TARGETDIR=${ROOTDIR}/target
TARGETDIR=${DIRNAME}/target

if [ ! -e ${TARGETDIR} ] ; then
if [ ! -e ${ROOTDIR}/jline/target ] ; then
echo "Build jline with maven before running the demo"
exit
fi;
if [ ! -e ${TARGETDIR} ] ; then
mkdir ${TARGETDIR}
fi;
if [ ! -e ${TARGETDIR}/lib ] ; then
mkdir ${TARGETDIR}/lib
fi;

JLINE_VERSION=$(ls ${TARGETDIR}/jline-*-SNAPSHOT.jar | sed -e 's#.*/jline-## ; s#SNAPSHOT.*#SNAPSHOT#')
JLINE_VERSION=$(ls ${ROOTDIR}/jline/target/jline-*-SNAPSHOT.jar | sed -e 's#.*/jline-## ; s#SNAPSHOT.*#SNAPSHOT#')
JANSI_VERSION=$(cat ${ROOTDIR}/pom.xml| grep jansi.version\> | sed -e 's#^.*<jansi.version>## ; s#</jansi.*##')
JNA_VERSION=$(cat ${ROOTDIR}/pom.xml| grep jna.version\> | sed -e 's#^.*<jna.version>## ; s#</jna.*##')
GOGO_RUNTIME_VERSION=1.0.2
GOGO_JLINE_VERSION=1.0.2

# JLINE
cp=${TARGETDIR}/jline-${JLINE_VERSION}.jar

# JANSI
if [ ! -f ${TARGETDIR}/lib/jansi-${JANSI_VERSION}.jar ] ; then
echo "Downloading Jansi..."
wget -O ${TARGETDIR}/lib/jansi-${JANSI_VERSION}.jar http://repo1.maven.org/maven2/org/fusesource/jansi/jansi/${JANSI_VERSION}/jansi-${JANSI_VERSION}.jar
fi
cp=$cp:${TARGETDIR}/lib/jansi-${JANSI_VERSION}.jar
cp=${ROOTDIR}/jline/target/jline-${JLINE_VERSION}.jar

# Gogo Runtime
if [ ! -f ${TARGETDIR}/lib/org.apache.felix.gogo.runtime-${GOGO_RUNTIME_VERSION}.jar ] ; then
Expand Down

0 comments on commit a5f0f19

Please sign in to comment.