Last active
December 12, 2015 07:48
-
-
Save nathanic/4739297 to your computer and use it in GitHub Desktop.
simple script to detect and run the latest h2 server
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 | |
# find and run the latest version of h2 in the local maven repo | |
H2VERSION=$(ls ~/.m2/repository/com/h2database/h2/ | grep '^[.0-9]*$' | tail -n 1) | |
if [[ -z "$H2VERSION" ]]; then | |
echo "NOPE: I can't find any h2 jars installed in your maven repo." | |
else | |
echo detected H2 version is $H2VERSION. | |
java -cp ~/.m2/repository/com/h2database/h2/${H2VERSION}/h2-${H2VERSION}.jar org.h2.tools.Server $@ | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment