#!/bin/bash

help() {
  echo "usage: $(basename $0) jdkprog arguments"
  echo "  e.g. >$(basename $0) javac DefineModels"
  echo "  e.g. >$(basename $0) java DefineTransformations"
  exit
}

if [ "$1" = "-h" -o -z "$1" ]; then
  help
fi

EXECDIR=$(dirname $0)

CLASSPATH=$EXECDIR:../jar/automedRepositories.jar
for i in $EXECDIR/../distjar/*.jar; do
  CLASSPATH=$CLASSPATH:$i
done

export CLASSPATH

exec "$@"
