#!/bin/bash

echo "---start 2c-audio plug-in setup main pre-update script---"
echo ""

auth_file_path_new="/Library/Application Support/2C-Audio/Breeze/Res/auth.prop"
auth_file_tmp_path="$INSTALLER_TEMP/auth.prop"

# backup the authorization file

echo $auth_file_path_old
echo ""
echo $auth_file_path_new
echo ""
echo $auth_file_tmp_path
echo ""

cp "$auth_file_path_new" "$auth_file_tmp_path"

mv -f "/Library/Application Support/2C-Audio/Breeze/Presets/user" "$INSTALLER_TEMP"

# remove full version

rm -r "/Library/Application Support/2C-Audio/Breeze/Data"
rm -r "/Library/Application Support/2C-Audio/Breeze/Presets"
rm -r "/Library/Application Support/2C-Audio/Breeze/Props"
rm -r "/Library/Application Support/2C-Audio/Breeze/Res"
rm -r "/Library/Application Support/2C-Audio/Breeze/Skins"
rm -r "/Library/Application Support/2C-Audio/Breeze/Logs"
rm -r "/Library/Application Support/2C-Audio/Breeze"

echo ""
echo "---end 2c-audio plug-in setup main pre-update script---"

exit 0