fostr/bin/let_sun_shine
Glen Whitney f789ed94fd feat: Add OCaml code generation
Also start using nailgun to speed up code generation.

  Resolves #6.
2021-02-28 22:21:56 -08:00

27 lines
639 B
Bash
Executable File

#!/bin/bash
BINDIR=$(dirname $BASH_SOURCE)
if $BINDIR/ng sunshine --help
then
# echo "sun already shining."
else
# echo "disperse the clouds."
SUNJAR="$BINDIR/../lib/sunshine.jar"
PROJDIR="$BINDIR/.."
if [[ ! $MVN_REPO ]]; then
MVN_REPO="$HOME/.m2/repository"
fi
if [[ ! -d $MVN_REPO ]]; then
MVN_REPO="/root/.m2/repository"
fi
if [[ ! -d $MVN_REPO ]]; then
echo "Cannot find your Maven repository. Please set environment variable"
echo "MVN_REPO to its full path and re-run."
exit 1
fi
java -jar $SUNJAR server >/dev/null 2>&1 &
sleep 5
$BINDIR/ng sunshine load -l $PROJDIR -l $MVN_REPO
fi