franta-hg@9: #!/bin/bash franta-hg@9: franta-hg@9: # copy-image-resizer franta-hg@9: # Copyright © 2013 František Kučera (frantovo.cz) franta-hg@9: # franta-hg@9: # This program is free software: you can redistribute it and/or modify franta-hg@9: # it under the terms of the GNU General Public License as published by franta-hg@9: # the Free Software Foundation, either version 3 of the License, or franta-hg@9: # (at your option) any later version. franta-hg@9: # franta-hg@9: # This program is distributed in the hope that it will be useful, franta-hg@9: # but WITHOUT ANY WARRANTY; without even the implied warranty of franta-hg@9: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the franta-hg@9: # GNU General Public License for more details. franta-hg@9: # franta-hg@9: # You should have received a copy of the GNU General Public License franta-hg@9: # along with this program. If not, see . franta-hg@9: franta-hg@9: DIR="`dirname $0`"; franta-hg@9: JAR="$DIR/../java/copy-image-resizer/dist/copy-image-resizer.jar"; franta-hg@9: franta-hg@16: # TODO: tune the path to the .jar file franta-hg@16: franta-hg@9: LOGGER="-Djava.util.logging.config.class=info.globalcode.sql.dk.logging.LoggerInitializer"; franta-hg@9: [ -n "$LOG_LEVEL" ] && LOGGER_LEVEL="-Dinfo.globalcode.sql.dk.logging.LoggerInitializer.level=$LOG_LEVEL"; franta-hg@9: franta-hg@9: CLASS_PATH="$JAR"; franta-hg@9: franta-hg@9: MAIN_CLASS="cz.frantovo.copyImageResizer.cli.CLIStarter"; franta-hg@9: franta-hg@16: # Customize logger output: franta-hg@16: LOGGER_INITIALIZER_CLASS="cz.frantovo.copyImageResizer.logging.ConsoleLoggerInitializer"; # colorful log for interactive work (human readable) franta-hg@16: LOGGER_INITIALIZER_CLASS="cz.frantovo.copyImageResizer.logging.SimpleLoggerInitializer"; # simple log for redirecting STDOUT to a file (machine readable) franta-hg@16: franta-hg@9: LOGGER="-Djava.util.logging.config.class=$LOGGER_INITIALIZER_CLASS"; franta-hg@16: franta-hg@16: # by LOG_LEVEL variable you can set custom log level. Default is INFO. Possible values are: ALL, FINE, FINER, FINEST, CONFIG, INFO, OFF. SEVERE, WARNING (see java.util.logging.Level class) franta-hg@16: [ -n "$LOG_LEVEL" ] && LOGGER_LEVEL="-Dcz.frantovo.copyImageResizer.logging.AbstractInitializer.level=$LOG_LEVEL"; franta-hg@9: franta-hg@9: java $LOGGER $LOGGER_LEVEL -cp "$CLASS_PATH" $MAIN_CLASS "$@" franta-hg@9: