#!/bin/sh

userprefs=/Users/*/Library/Preferences/name.razzfazz.driver.iScroll2.plist
files="/System/Library/Extensions/iScroll2.kext \
	/Library/PreferencePanes/iScroll2.prefPane \
	/Library/LaunchAgents/name.razzfazz.daemon.iScroll2.plist \
	/Library/StartupItems/iScroll2 \
	/usr/local/bin/iScroll2Daemon"

echo "iScroll2 preflight script running..."

for f in $files
do
	if [ -e "$f" ]
	then
    	echo "Removing $f..."
		if ! rm -R "$f"
		then
       		echo "ERROR: Unable to remove $f. Please remove manually."
		 fi
    	echo "$f successfully removed."
	else
   		echo "$f not found, skipping."
	fi
done

echo "iScroll2 preflight script done."
