#!/bin/sh

os=`uname -s`
arch=`uname -m`
nobin='no binary for your architecture, type make to compile and run ./opti_ledblur afterwards'

case "$os" in
IRIX*)
	bin/ledblur-sgi-irix $@
	;;

Linux)
	if [ "$arch" = 'i386' -o "$arch" = 'i586' -o "$arch" = 'i686' ]; then
		bin/ledblur-x86-linux $@
	elif [ "$arch" = 'x86_64' ]; then
		bin/ledblur-x86_64-linux $@
	else
		echo $nobin
		exit 1
	fi
	;;

FreeBSD)
	if [ "$arch" = 'i386' -o "$arch" = 'i586' -o "$arch" = 'i686' ]; then
		bin/ledblur-x86-freebsd $@
	else
		echo $nobin
		exit 1
	fi
	;;

*)
	echo $nobin
	exit 1
	;;
esac
