forked from splicemachine/spliceengine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sqlshell.sh
executable file
·26 lines (21 loc) · 877 Bytes
/
sqlshell.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
DIR=$(pwd)
if hash rlwrap 2>/dev/null; then
echo -en "\n ========= rlwrap detected and enabled. Use up and down arrow keys to scroll through command line history. ======== \n\n"
RLWRAP=rlwrap
else
echo -en "\n ========= rlwrap not detected. Consider installing for command line history capabilities. ========= \n\n"
RLWRAP=
fi
echo "Running Splice Machine SQL shell"
echo "For help: \"splice> help;\""
if [ -z "${CLIENT_SSL_KEYSTORE}" ]; then
cd splice_machine ; ${RLWRAP} mvn exec:java ; cd ${DIR}
else
cd splice_machine ; ${RLWRAP} mvn exec:java \
-Djavax.net.ssl.keyStore=${CLIENT_SSL_KEYSTORE} \
-Djavax.net.ssl.keyStorePassword=${CLIENT_SSL_KEYSTOREPASSWD} \
-Djavax.net.ssl.trustStore=${CLIENT_SSL_TRUSTSTORE} \
-Djavax.net.ssl.trustStore.ssl.trustStorePassword=${CLIENT_SSL_TRUSTSTOREPASSWD} \
; cd ${DIR}
fi