#!/bin/sh

if [ -z "$SERVER_CLASSES" ]; then
  echo "SERVER_CLASSES variable not set" 1>&2
  exit 1
fi

if [ -z "$JAVACOMPILER" ]; then
  JAVACOMPILER=javac
fi

echo "Compiling RDBMSRealm"
$JAVACOMPILER -d $SERVER_CLASSES ../util/RealmProperties.java
$JAVACOMPILER -d $SERVER_CLASSES *.java
echo "Copying rdbmsrealm.properties to " $SERVER_CLASSES/../..
cp rdbmsrealm.properties $SERVER_CLASSES/../..
echo 
