File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed
sql/files/defaultdata/only_output Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ # nothing to compile
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ # Scala compile wrapper-script for 'compile.sh'.
4+ # See that script for syntax and more info.
5+ #
6+ # This script requires that scala is installed in the chroot.
7+
8+ DEST=" $1 " ; shift
9+ MEMLIMIT=" $1 " ; shift
10+ MAINSOURCE=" $1 "
11+
12+ scalac " $@ "
13+ EXITCODE=$?
14+ [ " $EXITCODE " -ne 0 ] && exit $EXITCODE
15+
16+ MAINCLASS=" ${ENTRY_POINT:- $(basename " $MAINSOURCE " .scala)} "
17+
18+ # Report the entry point, so it can be saved, e.g. for later replay:
19+ if [ -z " $ENTRY_POINT " ]; then
20+ echo " Info: detected entry_point: $MAINCLASS "
21+ fi
22+
23+ cat > " $DEST " << EOF
24+ #!/bin/sh
25+ # Generated shell-script to execute scala interpreter on source.
26+
27+ # Detect dirname and change dir to prevent class not found errors.
28+ if [ "\$ {0%/*}" != "\$ 0" ]; then
29+ cd "\$ {0%/*}"
30+ fi
31+
32+ exec scala '$MAINCLASS ' "\$ @"
33+ EOF
34+
35+ chmod a+x " $DEST "
36+
37+ exit 0
You can’t perform that action at this time.
0 commit comments