#!/bin/bash -- hint to emacs # Source this file, not execute it. ## Source this file to set: ## JVM_ARGS :: arguments to the JVM ## CP :: Classpath ## STORE_SPEC :: Default store specification ## CMD :: The SDB command to call. ## Environment variable usage: ## SDBROOT :: The root of the SDB installation (required) ## JDBC_CONNECTOR :: The JDBC jar file ## JVM_ARGS :: Additional argument to the JVM (e.g. -Xmx1024M) ## Default store description ## is the file sdb.ttl in the ## current directory ## ---- Check root if [ "$SDBROOT" = "" ] then echo "SDBROOT is not set" 1>&2 exit 1 fi ## ---- Set class path separator SEP=':' if [ "$OSTYPE" = "cygwin" ] then SEP=';' fi ## ---- who am I? CMD=$(basename $0) ## ---- JDBC JDBC_MYSQL="${SDBROOT}/jdbc/mysql-connector-java-5.0.0-beta-bin.jar" JDBC_HSQLDB="${SDBROOT}/jdbc/hsqldb.jar" JDBC_PSQL="${SDBROOT}/jdbc/postgresql-8.1-407.jdbc3.jar" ## Commercial drivers can't be shipped for license reasons JDBC="$JDBC_PSQL" ## ARGS="--dbArgs 'useUnicode=true&characterEncoding=UTF-8'" ## ---- Additional JDBC jar files. CP="${JDBC_CONNECTOR:-$JDBC}" ## ---- Always put the HSQLDB jar on the path CP="$CP$SEP$JDBC_HSQLDB" ## ---- Add the script engine if [ "$SDBSCRIPT" != "" ] then CP="$SDBSCRIPT$SEP$CP" fi ## ---- JVM Args e.g. -Xmx1024M JVM_ARGS=${JVM_ARGS:-} ## ---- Classpath : adds in current CP export CP CP="$($SDBROOT/bin/sdb_path)" ## ---- Store description (default) STORE_SPEC="${STORE_SPEC:---sdb=sdb.ttl}"