Skip to content

Commit 4a1a2e6

Browse files
committed
init
1 parent f74e227 commit 4a1a2e6

File tree

2 files changed

+39
-0
lines changed
  • sql/files/defaultdata/only_output

2 files changed

+39
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
# nothing to compile
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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

0 commit comments

Comments
 (0)