default_version="19.0.1"
echo "Please enter version number (default ${default_version}):"
read version

if [ -z "$version" ]; then
  version=default_version
fi

installer_path=~/Downloads/DaVinci_Resolve_Studio_${version}_Linux/DaVinci_Resolve_Studio_${version}_Linux.run

read -p "Make sure the installer is located at '~/Downloads/Nuke${version}-linux-x86_64.run'. Press Enter to continue, or n to cancel..." answer

case $answer in
[Nn]*)
  echo "Installation cancelled"
  exit 0
  ;;
*)
  echo "Running installer..."
  ;;
esac

sudo SKIP_PACKAGE_CHECK=1 ${installer_path}

sudo dnf install libxcrypt-compat libcurl libcurl-devel mesa-libGLU -y

cd /opt/resolve/libs
sudo mkdir disabled-libraries
sudo mv libglib* disabled-libraries
sudo mv libgio* disabled-libraries
sudo mv libgmodule* disabled-libraries
