#!/bin/sh

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

case "$os" in
Linux)
	if [ "$arch" = 'i386' -o "$arch" = 'i586' -o "$arch" = 'i686' ]; then
		export LD_LIBRARY_PATH=lib
		bin/inv-gnulinux-x86_32 $@
	elif [ "$arch" = 'x86_64' ]; then
		export LD_LIBRARY_PATH=lib64
		bin/inv-gnulinux-x86_64 $@
	else
		echo $nobin
		exit 1
	fi
	;;

*)
	echo $nobin
	exit 1
	;;
esac

