#!/bin/bash -x | |
# $DIR is the directory that hosts this script. Solution taken from: | |
# http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in | |
SOURCE="${BASH_SOURCE[0]}" | |
DIR="$( dirname "$SOURCE" )" | |
while [ -h "$SOURCE" ] | |
do | |
SOURCE="$(readlink "$SOURCE")" | |
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" | |
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" | |
done | |
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" | |
source $DIR/javac.sh | |
if [ CHECK_THIS_VARIABLE ]; then | |
exit 0 | |
fi | |
exit 1 |