scripts/sql-dk.sh
author František Kučera <franta-hg@frantovo.cz>
Mon, 30 Dec 2013 00:01:39 +0100
branchv_0
changeset 101 97b0d9069133
parent 85 b9b4e95240e1
child 102 ff47349e24bf
permissions -rwxr-xr-x
Formatter is now AutoCloseable – so have chance to do some clean up and close the stream, if some error occurs (e.g. lost connection during result set reading)
     1 #!/bin/bash
     2 
     3 # TODO: systemwide JAR location
     4 JAR=~/projekty/SQL-DK/sql-dk/java/sql-dk/dist/sql-dk.jar;
     5 
     6 MAIN_CLASS="info.globalcode.sql.dk.CLIStarter";
     7 CLASSPATH="$JAR:/usr/share/java/postgresql-jdbc4.jar";
     8 
     9 LOGGER="-Djava.util.logging.config.class=info.globalcode.sql.dk.logging.LoggerInitializer";
    10 # LOG_LEVEL="FINE"; # SEVERE, WARNING, INFO, FINE, FINER, FINEST, ALL
    11 [ -n "$LOG_LEVEL" ] && LOGGER_LEVEL="-Dinfo.globalcode.sql.dk.logging.LoggerInitializer.level=$LOG_LEVEL";
    12 
    13 java $LOGGER $LOGGER_LEVEL -cp $CLASSPATH $MAIN_CLASS "$@"