Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
as6325400 committed Oct 23, 2024
1 parent f74e227 commit 4a1a2e6
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sql/files/defaultdata/only_output/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
# nothing to compile
37 changes: 37 additions & 0 deletions sql/files/defaultdata/only_output/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/sh

# Scala compile wrapper-script for 'compile.sh'.
# See that script for syntax and more info.
#
# This script requires that scala is installed in the chroot.

DEST="$1" ; shift
MEMLIMIT="$1" ; shift
MAINSOURCE="$1"

scalac "$@"
EXITCODE=$?
[ "$EXITCODE" -ne 0 ] && exit $EXITCODE

MAINCLASS="${ENTRY_POINT:-$(basename "$MAINSOURCE" .scala)}"

# Report the entry point, so it can be saved, e.g. for later replay:
if [ -z "$ENTRY_POINT" ]; then
echo "Info: detected entry_point: $MAINCLASS"
fi

cat > "$DEST" <<EOF
#!/bin/sh
# Generated shell-script to execute scala interpreter on source.
# Detect dirname and change dir to prevent class not found errors.
if [ "\${0%/*}" != "\$0" ]; then
cd "\${0%/*}"
fi
exec scala '$MAINCLASS' "\$@"
EOF

chmod a+x "$DEST"

exit 0

0 comments on commit 4a1a2e6

Please sign in to comment.