Skip to content

Instantly share code, notes, and snippets.

@drewdiver
Last active July 1, 2019 17:30
Show Gist options
  • Save drewdiver/7b2e7b98192b7c55cd9b61ab602d6cc7 to your computer and use it in GitHub Desktop.
Save drewdiver/7b2e7b98192b7c55cd9b61ab602d6cc7 to your computer and use it in GitHub Desktop.
Removes the Audio Unit and Waves cache, checks the V9 folder exists and launches the AU Reg Util
#!/bin/sh
currentUser=$(/usr/bin/python -c 'from SystemConfiguration import SCDynamicStoreCopyConsoleUser; import sys; \
username = (SCDynamicStoreCopyConsoleUser(None, None, None) or [None])[0]; username = [username,""][username in [u"loginwindow", None, u""]]; \
sys.stdout.write(username + "\n");')
wavesAURegUtil=/Applications/Waves/WaveShells\ V9/Waves\ AU\ Reg\ Utility1\ 9.92.app
# Make sure Logic isn't running
if ps aux | grep '[L]ogic' >> /dev/null 2>&1
then
killall "Logic Pro X"
fi
if [ -d "${wavesAURegUtil}" ]
then
rm -rf "/Users/${currentUser}/Library/Preferences/Waves Preferences" >> /dev/null 2>&1
rm -f "/Users/${currentUser}/Library/Caches/AudioUnitCache/com.apple.audiounits.cache" >> /dev/null 2>&1
sudo -u "${currentUser}" open "${wavesAURegUtil}"
echo "Success! Launch Logic Pro X."
else
echo "${wavesAURegUtil} not found, are you sure you used the offline V9 installer?"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment