cd ..
LOAD=load_mac
MAC=`echo ${OSTYPE} | tr '[A-Z]' '[a-z]'| grep -o darwin`  # on MAC OS it is "darwin"
if [ "${MAC}" = "" ]; then
	# assume linux
	LOAD=load_lin
	LINUX=`echo ${OSTYPE} | tr '[A-Z]' '[a-z]'| grep -o linux`
	if [ "${LINUX}" = "" ]; then
		echo "${LOAD} not supported on this (${OSTYPE}) platform"
		exit 1
	fi
else
	# we are running MacOS, try to find if it is supporting only 64 bit binaries (High Sierra (10.13.x) or later)
	# we do that using MacOS built-in command sw_vers
	MAC_OS_MAJOR_VER=`sw_vers -productVersion | cut -d"." -f1`
	MAC_OS_MINOR_VER=`sw_vers -productVersion | cut -d"." -f2`
	if [ "$MAC_OS_MAJOR_VER" -gt 10 ]; then
		LOAD=load_mac-x86_64
	else
		if [ "$MAC_OS_MINOR_VER" -gt 12 ]; then
			LOAD=load_mac-x86_64
		fi
	fi
fi
chmod a+x linux_mac/${LOAD} 
linux_mac/${LOAD} -g compound.bin abclw.rom 0xc000 fs.bin 0xc100 sg.bin 0xc200 abclapp.cob 0xc400 custom1.cob 0xc600 bclio.bin 0xc900 applications.cob 0xcA00
