echo "Welcome! This script will install the necessary dependencies for Unity to run normally on Arch Linux. If you are using a different distro, this will not work."

sleep 1

command -v pacman >/dev/null
if [ "$?" != "0" ]
then
    echo "You are not running Arch Linux. This script will not work."
    exit 1
fi

command -v yay >/dev/null
if [ "$?" != "0" ]
then
    echo "yay is not installed. This script requires yay to be installed to install packages from the AUR."
    exit 1
fi

echo "Installing Mono, MSBuild and the .NET SDK..."
sudo pacman -S mono msbuild dotnet-sdk --needed

echo "Installing miscellaneous dependencies..."
sudo pacman -S desktop-file-utils gcc-libs glu gtk3 lib32-gcc-libs libpng12 libpqxx libxtst npm nss xdg-utils jq intel-tbb libgl --needed
echo "Installing miscellaneous dependencies from the AUR..."
yay -S gconf icu63 ncurses5-compat-libs --needed

echo "Done. Unity should now be able to run properly."
