Just off the top of my head, depending on your kernel version and whether you're using a static /dev, IDE drives will be /dev/hd* and SATA drives will be /dev/sd*.
So you could use something like:
if [ -e /dev/hda ]; then
if [ -e /dev/sda ]; then
do something else
Or however you want to do it. You could also check /sys/bus/ide/devices/ for devices, and there are probably a lot of other or better ways that I'm not aware of