#!/bin/sh

case $* in
    -psn*) set --;;
esac

macosdir() {
    script="$0"
    cd "${script%/*}"
    while [ -L "$script" ]; do
        script=$(readlink "$script")
        case $script in */*) cd "${script%/*}";; esac
    done
    pwd -P
}

javadir="$(macosdir)/../Java"
swt_arch="@SWT_ARCH@"
exec java -XstartOnFirstThread -jar "$javadir/AppleCommander-macosx-$swt_arch-@VERSION@.jar" "$@"
