While @ hd1's answer gives you if the file exists, it does not necessarily mean that the directory is installed or not. Perhaps the file exists if you use this script for different machines or use different mount points. I would suggest this
LOCALMOUNTPOINT="/folder/share" if mount | grep "on $LOCALMOUNTPOINT" > /dev/null; then echo "mounted" else echo "not mounted" fi
Note that I include "on" in the grep statement based on the mount command that appears on my computer. You said you were using MacOS, so it should work, but depending on what mount commands print, you may need to change the code above.
ysakamoto
source share