#!/bin/sh

# Script used by Razer DA installer to remove any old versions to make sure everything
# gets installed properly.

#rm -r /System/Library/Extensions/RazerDeathAdderDriver.kext
#rm -r "/Library/Application Support/Razer/RazerDeathAdderDaemon.app"
#rm -r /Applications/RazerDeathAdder.app
#rm -r /Applications/Utilities/RazerDeathAdderUninstaller.command

# Bug 3505
# David, 07/27/2010
# Borrow this block from RazerDeathAdderUninstaller.command. We have to remove receipts 
# during installation, otherwise receipts of V2.0.2 will block KEXT bundle of V3.0.0 to 
# be installed. Note that on Snow Leopard, there's no individual pkg bundle stored in 
# /Library/Receipts anymore. OSX is using a PLIST file to record all PKG information. 
# So the professional fixing should also include removal of relative items in that PLIST.
sudo rm -rf "/Library/Receipts/Razer DeathAdder"*
sudo rm -f "/Library/Receipts/InstallHistory.plist"
sudo rm -rf /private/var/db/receipts/com.razer.pkg.DeathAdder.*
# --

exit 0