3 # include user-defined overrides and customization
4 if [ -f ~/.sql-dk/environment.sh ]; then # .sql-dk must match with DIR in Constants.java
5 . ~/.sql-dk/environment.sh
8 # link/copy support files for configuration:
9 [ -f ~/.sql-dk/environment.sh ] || touch ~/.sql-dk/environment.sh
10 [ -f ~/.sql-dk/config.xsd ] || ln -s /usr/share/doc/sql-dk/config.xsd ~/.sql-dk/config.xsd
11 [ -f ~/.sql-dk/config.rnc ] || ln -s /usr/share/doc/sql-dk/config.rnc ~/.sql-dk/config.rnc
12 [ -f ~/.sql-dk/config.xsl ] || gunzip < /usr/share/doc/sql-dk/config.xsl.gz > ~/.sql-dk/config.xsl # might not work in www browser if just symlinked
15 # Standard JDBC drivers
16 [ -n "$STANDARD_JDBC" ] || STANDARD_JDBC=(
17 "/usr/share/java/postgresql-jdbc4.jar"
18 "/usr/share/java/mysql.jar"
21 # Additional JDBC drivers might be specified in CUSTOM_JDBC array
22 # Plugins (formatters etc.) might be specified in PLUGINS array
24 # JAR containing SQL-DK application
25 [ -n "$JAR" ] || JAR="/usr/share/sql-dk/sql-dk.jar";
29 for e in "${STANDARD_JDBC[@]}" "${CUSTOM_JDBC[@]}" "${PLUGINS[@]}"; do
30 CLASS_PATH="$CLASS_PATH:$e";
34 MAIN_CLASS="info.globalcode.sql.dk.CLIStarter";
36 LOGGER="-Djava.util.logging.config.class=info.globalcode.sql.dk.logging.LoggerInitializer";
37 [ -n "$LOG_LEVEL" ] && LOGGER_LEVEL="-Dinfo.globalcode.sql.dk.logging.LoggerInitializer.level=$LOG_LEVEL";
39 java "${JAVA_OPTIONS[@]}" $LOGGER $LOGGER_LEVEL -cp "$CLASS_PATH" $MAIN_CLASS "$@"