#!/bin/bash

# setup JAVACLASS path for using the flanagan library

# quit before potential errors
if [ ! -f "$PWD/lib/flanagan.jar" ];then
    echo "Error: Please put your 'flanagan.jar' in ./lib/flanagan.jar" 1>&2
    exit 1
fi
if ! echo "${PWD##*/}" | grep -q "^inputOutputFlanagan"; then
    echo "Error: Please execute this file in the 'inputOutputFlanagan' directory" 1>&2
    exit 1
fi

echo "export CLASSPATH=\":$PWD/lib/flanagan.jar:\"" > .path
# now execute in your commandline "source .path"
