#!/bin/sh
##
##  neo4j-admin.sh -- Neo4J Admin Shell Startup Wrapper
##

cp=""
for file in \
    @l_prefix@/lib/neo4j/server/*.jar \
    @l_prefix@/lib/neo4j/plugin/*.jar; do
    if [ -f $file ]; then
        if [ ".$cp" = . ]; then
            cp="$file"
        else
            cp="$cp:$file"
        fi
    fi
done

NEO4J_HOME=@l_prefix@/var/neo4j
export NEO4J_HOME
cd $NEO4J_HOME

exec @l_prefix@/bin/java \
    -Vsun-jdk -Xms1024m -Xmx2048m -cp "$cp" \
    -Dapp.name="neo4j-admin" \
    -Dapp.pid="$$" \
    -Dapp.repo="@l_prefix@/lib/neo4j" \
    org.neo4j.commandline.admin.AdminTool \
    ${1+"$@"}

