#!/bin/bash

# Remove any existing FCP preference files
"$3/bin/rm" -f ~/Library/Preferences/Final\ Cut\ Pro\ User\ Data/Final\ Cut\ Pro\ [0-9.]*\ Preferences
"$3/bin/rm" -f ~/Library/Preferences/Final\ Cut\ Pro\ User\ Data/Final\ Cut\ Pro\ [0-9.]*\ Prefs.fcset
"$3/bin/rm" -f ~/Library/Preferences/Final\ Cut\ Pro\ User\ Data/Final\ Cut\ Pro\ Obj\ Cache.fcmch
"$3/bin/rm" -f ~/Library/Preferences/Final\ Cut\ Pro\ User\ Data/Final\ Cut\ Pro\ Prof\ Cache.fcpch
"$3/bin/rm" -f ~/Library/Preferences/Final\ Cut\ Pro\ User\ Data/Final\ Cut\ Pro\ MOA\ Cache
"$3/bin/rm" -f ~/Library/Preferences/Final\ Cut\ Pro\ User\ Data/Final\ Cut\ Pro\ POA\ Cache

# Force a cache miss on the kext cache
"$3/usr/bin/touch" $3/System/Library/Extensions
