Files
OpenUxAS-bootstrap/run-example

26 lines
845 B
Plaintext
Raw Permalink Normal View History

#! /bin/bash
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
# First, let's set up our environment.
eval "$( "${ROOT_DIR}"/anod printenv uxas )"
eval "$( "${ROOT_DIR}"/anod printenv uxas-ada )"
eval "$( "${ROOT_DIR}"/anod printenv amase )"
# Now, as a sanity check, let's make sure that uxas and amase have been built.
if [ ! -f "${UXAS_INSTALL_DIR}"/bin/uxas ]; then
echo "You need to build OpenUxAS first, using \`./anod-build uxas\`"
exit 1
fi
if [ ! -f "${AMASE_SOURCE_DIR}"/OpenAMASE/build/classes/MakeDistribution.class ]; then
echo "You need to build OpenAMASE first, using \`./anod-build amase\`"
exit 2
fi
# Now, let's let the user know where we're working.
echo "Using run-example in ${UXAS_SOURCE_DIR}."
echo " "
# Pass arguments on to run-example
"${UXAS_SOURCE_DIR}"/run-example $@