File: repl

package info (click to toggle)
libminidns-java 1.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,576 kB
  • sloc: java: 13,431; xml: 171; sh: 22; perl: 16; makefile: 3
file content (30 lines) | stat: -rwxr-xr-x 656 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
set -e
set -u
set -o pipefail

while getopts d OPTION "$@"; do
    case $OPTION in
	d)
	    set -x
	    ;;
    esac
done

PROJECT_ROOT=$(dirname "${BASH_SOURCE[0]}")
cd "${PROJECT_ROOT}"

echo "Compiling and computing classpath (May take a while)"
# Sadly even with the --quiet option Gradle (or some component of)
# will print the number of warnings/errors to stdout if there are
# any.
GRADLE_CLASSPATH="$(gradle :minidns-repl:printClasspath --quiet |\
	tail -n1)"
echo "Classpath computed, starting REPL"

java \
	-ea \
	-Dscala.usejavacp=true \
	-classpath "${GRADLE_CLASSPATH}" \
	ammonite.Main \
	--predef minidns-repl/scala.repl