scripts/sql-dk.sh
author František Kučera <franta-hg@frantovo.cz>
Wed, 01 Jan 2014 18:25:11 +0100
branchv_0
changeset 109 aef98fd7c7c9
parent 102 ff47349e24bf
child 111 259c0c64321b
permissions -rwxr-xr-x
version info: copyright and contact
     1 #!/bin/bash
     2 
     3 if [ -f ~/.sql-dk/environment.sh ]; then # .sql-dk must match with DIR in Constants.java
     4     . ~/.sql-dk/environment.sh
     5 fi
     6 
     7 # TODO: systemwide JAR location
     8 JAR=~/projekty/SQL-DK/sql-dk/java/sql-dk/dist/sql-dk.jar;
     9 
    10 MAIN_CLASS="info.globalcode.sql.dk.CLIStarter";
    11 CLASSPATH="$JAR:/usr/share/java/postgresql-jdbc4.jar";
    12 
    13 LOGGER="-Djava.util.logging.config.class=info.globalcode.sql.dk.logging.LoggerInitializer";
    14 # LOG_LEVEL="FINE"; # SEVERE, WARNING, INFO, FINE, FINER, FINEST, ALL
    15 [ -n "$LOG_LEVEL" ] && LOGGER_LEVEL="-Dinfo.globalcode.sql.dk.logging.LoggerInitializer.level=$LOG_LEVEL";
    16 
    17 java $LOGGER $LOGGER_LEVEL -cp $CLASSPATH $MAIN_CLASS "$@"