#!/bin/sh ## Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0 # If JENA_HOME is empty if [ -z "$JENA_HOME" ] then SCRIPT="$0" # Catch common issue: script has been symlinked if [ -L "$SCRIPT" ] then SCRIPT="$(readlink "$0")" # If link is relative case "$SCRIPT" in /*) ;; # fine *) SCRIPT=$( dirname "$0" )/$SCRIPT;; # fix esac fi # Work out root from script location JENA_HOME="$( cd "$( dirname "$SCRIPT" )/.." && pwd )" fi # ---- Setup JVM_ARGS=${JVM_ARGS:--Xmx1024M} # Expand JENA_HOME but literal * JENA_CP="$JENA_HOME"'/lib/*' SOCKS= LOGGING="-Dlog4j.configuration=file:$JENA_HOME/jena-log4j.properties" # Platform specific fixup # On CYGWIN convert path and end with a ';' case "$(uname)" in CYGWIN*) JENA_CP="$(cygpath -wp "$JENA_CP");";; esac # Respect TMPDIR or TMP (windows?) if present # important for tdbloader spill if [ -n "$TMPDIR" ] then JVM_ARGS="$JVM_ARGS -Djava.io.tmpdir=\"$TMPDIR\"" elif [ -n "$TMP" ] then JVM_ARGS="$JVM_ARGS -Djava.io.tmpdir=\"$TMP\"" fi java $JVM_ARGS $LOGGING -cp "$JENA_CP" tdb.tdbstats "$@"