#!/bin/bash
IFS=$'\n'

THEFILE="/Applications/iPhoto.app/Contents/PlugIns/iPhoto2Gmail.iPhotoExporter";
#echo "Executing Preflight"
#echo "About to delete "$THEFILE 
if [ -d $THEFILE ];
then
	echo "Deleting previous version of iPhoto2Gmail Plugin in app bundle"
	rm -Rf $THEFILE
fi

THEFILE2="/Library/Application Support/iPhoto/Plugins/iPhoto2Gmail.iPhotoExporter";
if [ -d $THEFILE2 ];
then
	echo "Deleting previous version of iPhoto2Gmail Plugin in shared plugin location"
	rm -Rf $THEFILE2
fi

exit 0
