#!/bin/sh

cp=""
for file in @l_prefix@/lib/kotlin/*.jar; do
    if [ ".$cp" = . ]; then
        cp="$file"
    else
        cp="$cp:$file"
    fi
done

exec @l_prefix@/bin/java \
    -Vsun-jdk -Xmx256M -Xms32M -noverify -cp "$cp" \
    org.jetbrains.kotlin.preloading.Preloader \
    -cp "$cp" \
    org.jetbrains.kotlin.cli.js.K2JSCompiler \
    ${1+"$@"}

