2018-08-22 22:05:38 +08:00
|
|
|
#!/bin/bash -e
|
2017-06-09 15:28:18 +08:00
|
|
|
|
2018-08-22 22:05:38 +08:00
|
|
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
cd "$DIR"
|
2017-07-13 02:17:26 +08:00
|
|
|
|
2018-08-22 22:05:38 +08:00
|
|
|
for i in java javac; do
|
|
|
|
if ! which $i >/dev/null; then
|
|
|
|
echo "Please install $i!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
done
|
2017-06-09 15:28:18 +08:00
|
|
|
|
|
|
|
DRIVER=neo4j-java-driver.jar
|
|
|
|
|
|
|
|
if [ ! -f $DRIVER ]; then
|
2018-08-22 22:05:38 +08:00
|
|
|
# Driver downloaded from: http://central.maven.org/maven2/org/neo4j/driver/neo4j-java-driver/1.5.2/neo4j-java-driver-1.5.2.jar
|
|
|
|
wget -nv http://deps.memgraph.io/drivers/java/neo4j-java-driver-1.5.2.jar -O $DRIVER || exit 1
|
2017-06-09 15:28:18 +08:00
|
|
|
fi
|
|
|
|
|
2017-07-13 02:17:26 +08:00
|
|
|
javac -classpath .:$DRIVER Basic.java
|
|
|
|
java -classpath .:$DRIVER Basic
|
|
|
|
|
|
|
|
javac -classpath .:$DRIVER MaxQueryLength.java
|
|
|
|
java -classpath .:$DRIVER MaxQueryLength
|