#!/bin/sh
if [ -e /Applications/"CanoScan Toolbox 4.9"/"CanoScan Toolbox X.app" ]
then
	ln -s /Applications/"CanoScan Toolbox 4.9"/"CanoScan Toolbox X.app" ~/Desktop/"CanoScan Toolbox 4.9"
fi

if [ -e /Applications/"CanoScan Toolbox 4.9"/AliasSet.app ]
then
	open /Applications/"CanoScan Toolbox 4.9"/AliasSet.app
	isAlive=1
	while [ $isAlive = 1 ]
	do
		isAlive=`ps -ax | grep "AliasSet.app" | grep -v "grep" | wc -l`
		sleep 1
	done
	rm -R /Applications/"CanoScan Toolbox 4.9"/AliasSet.app
fi
