#!/bin/sh
## Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0

ROOT="$JENAROOT"
if [ -z "$ROOT" ]
then
    ROOT="$ARQROOT"
    fi
if [ -z "$ROOT" ]
then
    echo "JENAROOT not set" 1>&2
    exit 1
    fi

# TMP on Windows, and TMPDIR on linux.
T=
if [ "$TMP" != "" ]
then
    T="$TMP"
    fi
if [ "$TMPDIR" != "" ]
then
    T="$TMPDIR"
    fi

# ---- Setup
JVM_ARGS=${JVM_ARGS:--Xmx1024M}
if [ "$T" != "" ]
then
    JVM_ARGS="$JVM_ARGS -Djava.io.tmpdir=$T"
    fi

# Expand JENAROOT but literal *
JENA_CP="$JENAROOT"'/lib/*'
SOCKS=
LOGGING="-Dlog4j.configuration=file:$JENAROOT/jena-log4j.properties"

java $JVM_ARGS $LOGGING -cp "$JENA_CP" tdb.tdbloader3 "$@" 
