bootstrap script
authorFrantišek Kučera <franta-hg@frantovo.cz>
Mon, 17 Nov 2014 18:12:57 +0100
changeset 900d15f596bce
parent 8 4819598eb623
child 10 a5a723467a39
bootstrap script
scripts/copy-image-resizer.sh
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/scripts/copy-image-resizer.sh	Mon Nov 17 18:12:57 2014 +0100
     1.3 @@ -0,0 +1,35 @@
     1.4 +#!/bin/bash
     1.5 +
     1.6 +#  copy-image-resizer
     1.7 +#  Copyright © 2013 František Kučera (frantovo.cz)
     1.8 +#
     1.9 +#  This program is free software: you can redistribute it and/or modify
    1.10 +#  it under the terms of the GNU General Public License as published by
    1.11 +#  the Free Software Foundation, either version 3 of the License, or
    1.12 +#  (at your option) any later version.
    1.13 +#
    1.14 +#  This program is distributed in the hope that it will be useful,
    1.15 +#  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.16 +#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    1.17 +#  GNU General Public License for more details.
    1.18 +#
    1.19 +#  You should have received a copy of the GNU General Public License
    1.20 +#  along with this program. If not, see <http://www.gnu.org/licenses/>.
    1.21 +
    1.22 +DIR="`dirname $0`";
    1.23 +JAR="$DIR/../java/copy-image-resizer/dist/copy-image-resizer.jar";
    1.24 +
    1.25 +LOGGER="-Djava.util.logging.config.class=info.globalcode.sql.dk.logging.LoggerInitializer";
    1.26 +[ -n "$LOG_LEVEL" ] && LOGGER_LEVEL="-Dinfo.globalcode.sql.dk.logging.LoggerInitializer.level=$LOG_LEVEL";
    1.27 +
    1.28 +CLASS_PATH="$JAR";
    1.29 +
    1.30 +MAIN_CLASS="cz.frantovo.copyImageResizer.cli.CLIStarter";
    1.31 +
    1.32 +LOGGER_INITIALIZER_CLASS="cz.frantovo.copyImageResizer.logging.ConsoleLoggerInitializer";
    1.33 +LOGGER="-Djava.util.logging.config.class=$LOGGER_INITIALIZER_CLASS";
    1.34 +[ -n "$LOG_LEVEL" ] && LOGGER_LEVEL="-D$LOGGER_INITIALIZER_CLASS.level=$LOG_LEVEL";
    1.35 +
    1.36 +java $LOGGER $LOGGER_LEVEL -cp "$CLASS_PATH" $MAIN_CLASS "$@"
    1.37 +
    1.38 +