#!/bin/sh

if [ ! -f "$1" ]; then
	echo >&2 "$1: No such file"
	exit 1
fi

/usr/libx32/binfmt-detector "$1"

if [ $? -eq 0 ]; then
	exec /usr/bin/mono "$@"
else
	exec /usr/bin/wine "$@"
fi
