#!/bin/bash

cd "$HOME/Downloads" || exit 1

echo "Step 1 of 4: Downloading ProSuite..."
curl --progress-bar -fL -o ProSuite.tar.xz "https://provalisresearch.com/Download/ProSuite.tar.xz" || exit 1

echo
echo "Step 2 of 4: Installing ProSuite in Applications. Please wait..."
tar -xJf ProSuite.tar.xz -C /Applications/ || exit 1

echo
echo "Step 3 of 4: Preparing ProSuite for macOS..."
xattr -drs com.apple.quarantine "/Applications/ProSuite.app" 2>/dev/null || trueThe

echo
echo "Step 4 of 4: Cleaning up..."
rm -f ProSuite.tar.xz

echo
echo "Done. ProSuite has been installed in the Applications folder."
echo "You can now open ProSuite from Applications."
echo
read -n 1 -s -r -p "Press any key to close this window..."