#!/bin/bash

# TODO: systemwide JAR location
JAR=~/projekty/SQL-DK/sql-dk/java/sql-dk/dist/sql-dk.jar;

MAIN_CLASS="info.globalcode.sql.dk.CLIStarter";
CLASSPATH="$JAR:/usr/share/java/postgresql-jdbc4.jar";

LOGGER="-Djava.util.logging.config.class=info.globalcode.sql.dk.logging.LoggerInitializer";
# LOG_LEVEL="FINE"; # SEVERE, WARNING, INFO, FINE, FINER, FINEST, ALL
[ -n "$LOG_LEVEL" ] && LOGGER_LEVEL="-Dinfo.globalcode.sql.dk.logging.LoggerInitializer.level=$LOG_LEVEL";

java $LOGGER $LOGGER_LEVEL -cp $CLASSPATH $MAIN_CLASS "$@"
