#!/usr/bin/env bash

# -------------------------------------------------------------------------
# ModeShape Rest Client CLI Script for Linux
# -------------------------------------------------------------------------

# Setup the JVM
if [ "x$JAVA" = "x" ]; then
    if [ "x$JAVA_HOME" != "x" ]; then
        JAVA="$JAVA_HOME/bin/java"
    else
        echo JAVA_HOME is not set. Unexpected results may occur.
        echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
        JAVA="java"
    fi
fi
 
export CLASSPATH="./*"
"${JAVA}" org.modeshape.web.jcr.rest.client.json.JsonRestClient "$@"
read -p "Press [Enter] to continue..."