#!/bin/bash
# Io Version of Preflight

APPLICATIONS="Applications"
LIBRARY="Library"
EXTENSIONS="System/Library/Extensions"
QUICKTIME="$LIBRARY/QuickTime"
RTENABLER="$LIBRARY/Application Support/Final Cut Pro System Support/Plugins"
FCP_USER_DATA="$LIBRARY/Preferences/Final Cut Pro User Data/"
CUSTOM_SETTINGS="$LIBRARY/Application Support/Final Cut Pro System Support/Custom Settings"
PREFPANE="$LIBRARY/PreferencePanes"
STARTUP_ITEMS="$LIBRARY/StartupItems"

"$3/bin/rm" -rf $3/System/Library/Extensions/*KHD.kext
"$3/bin/rm" -rf $3/System/Library/Extensions/*KSD.kext
"$3/bin/rm" -rf $3/System/Library/Extensions/*KONA.kext
"$3/bin/rm" -rf $3/System/Library/Extensions/*KONA2.kext
"$3/bin/rm" -rf $3/System/Library/Extensions/*KONA3.kext
"$3/bin/rm" -rf $3/System/Library/Extensions/*KONALH.kext
"$3/bin/rm" -rf $3/System/Library/Extensions/*KONALS.kext
"$3/bin/rm" -rf $3/System/Library/Extensions/*KONAOEM.kext
"$3/bin/rm" -rf $3/System/Library/Extensions/*KONA3OEM.kext
"$3/bin/rm" -rf $3/System/Library/Extensions/*KONALHOEM.kext
"$3/bin/rm" -rf $3/System/Library/Extensions/AJAOEM*.kext
"$3/bin/rm" -rf $3/System/Library/Extensions/AJAKONA*.kext
"$3/bin/rm" -rf $3/System/Library/Extensions/AJAIo*.kext
"$3/bin/rm" -rf $3/System/Library/Extensions/AJACorvid*.kext

"$3/bin/rm" -rf $3/Library/StartupItems/avksd
"$3/bin/rm" -rf $3/Library/StartupItems/avkhd
"$3/bin/rm" -rf $3/Library/StartupItems/AJAKonaStartupD

"$3/bin/rm" -rf $3/Library/Application\ Support/AJA/AJAAgent
"$3/bin/rm" -rf $3/Library/LaunchAgents/com.aja*.plist
"$3/bin/rm" -rf $3/Library/Application\ Support/AJA/AJADaemon
"$3/bin/rm" -rf $3/usr/libexec/ajad
"$3/bin/rm" -rf $3/Library/LaunchDaemons/com.aja*.plist

"$3/bin/rm" -rf $3/Library/PreferencePanes/Kona*Preferences.prefPane
"$3/bin/rm" -rf $3/Library/Preference/com.aja.IoHD*.plist

"$3/bin/rm" -rf $3/Library/QuickTime/Kona*.component
"$3/bin/rm" -rf $3/Library/QuickTime/AJA*.component

"$3/bin/rm" -rf $3/Applications/Kona\ Utilities/AJA*
"$3/bin/rm" -f $3/Applications/Kona\ Utilities

"$3/bin/rm" -rf $3/Applications/AJA\ Kona\ Utilities/AJA*
"$3/bin/rm" -f $3/Applications/AJA\ Kona\ Utilities

"$3/bin/rm" -rf $3/Applications/AJA\ Utilities/AJA*
"$3/bin/rm" -f $3/Applications/AJA\ Utilities

 # older installers put this stuff in there
"$3/bin/rm" -rf $3/Applications/KHDWatcher.app
"$3/bin/rm" -rf $3/Applications/KSDWatcher.app
"$3/bin/rm" -rf $3/Applications/Kona*
"$3/bin/rm" -rf $3/Applications/AJA Utilities
"$3/bin/rm" -rf $3/Applications/AJA ControlPanel

# Remove receipts
"$3/bin/rm" -rf $3/Library/Receipts/AJA\ KONA*
"$3/bin/rm" -rf $3/Library/Receipts/AJA\ OEM*
"$3/bin/rm" -rf $3/Library/Receipts/AJA\ IoHD*
"$3/bin/rm" -rf $3/Library/Receipts/Kona3.pkg
"$3/bin/rm" -rf $3/Library/Receipts/Kona2.pkg
"$3/bin/rm" -rf $3/Library/Receipts/KonaLH.pkg
"$3/bin/rm" -rf $3/Library/Receipts/IoHD.pkg
"$3/bin/rm" -rf $3/Library/Receipts/KonaLHI.pkg
"$3/bin/rm" -rf $3/Library/Receipts/Corvid.pkg

"$3/bin/rm" -rf $3/Users/*/Library/Preferences/com.aja.application.k?dcontrolpanel.plist

