#!/bin/bash

CMDNAME=`basename "$0"`

export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
SOLR=/opt/local/share/java/apache-solr-3.2.0

usage() {
  echo "Usage: $ solr path/to/config/dir"
  exit 1
}

if [ -z "$1" ]; then
  usage
else
  cd ${SOLR} && exec ${JAVA_HOME}/bin/java -Dsolr.solr.home=$1 -jar ${SOLR}/start.jar
fi

