#
# QL
#
# Manager: Matthew Piccolella
# Systems Architect: Anshul Gupta
# Tester: Evan Tarrh
# Language Guru: Gary Lin
# Systems Integrator: Mayank Mahajan



#!/bin/bash
# Make sure we have a command line argument we're happy with/
if [ $# -lt 1 ]; then
  echo "Please pass a QL file name"
  exit 1
else
  if [[ $1 == *.ql ]]; then
    echo "Please do not include the .ql file extension"
    exit 1
  fi
fi

# Try to compile our file
javac -classpath build/json-simple-1.1.1.jar $1.java >& /dev/null
if [ $? -eq 0 ]; then
  java -classpath build/json-simple-1.1.1.jar:. $1
else
  echo "Compiler error"
fi