#!/bin/sh
#identifies the OS type and calls oaupgrade32 or oaupgrade64 for 32 bit or 64 bit OS respectively.

mach_type=$(getconf LONG_BIT)

if [ $mach_type = "64" ]; then
	./oaupgrade64 $@
	_RESULT=$?	
elif [ $mach_type = "32" ]; then
	./oaupgrade32 $@
	_RESULT=$?
else
	echo "Failed Identifying machine type. Use oaupgrade32 or oaupgrade64 for 32 bit or 64 bit OS respectively."
	_RESULT=142
fi
exit $_RESULT

