Remove DaVinci installer upon install

This commit is contained in:
Gabriel Brown 2024-06-10 10:24:01 -05:00
parent aa564d4b70
commit 05fbb1dbaa

View File

@ -1,6 +1,7 @@
# Check for argument # Check for argument
if [ -z "$1" ]; then if [ -z "$1" ]; then
echo "Usage: $0 <path to DaVinci_Resolve_17.2.2_Linux.run>" echo "No argument supplied. If you have already downloaded the DaVinci Resolve"
echo " zip file, please provide the path to the file as an argument."
read -rp "Press Enter to open the download page..." read -rp "Press Enter to open the download page..."
xdg-open https://www.blackmagicdesign.com/products/davinciresolve xdg-open https://www.blackmagicdesign.com/products/davinciresolve
read -rp "Once the download is finished, press Enter to continue..." read -rp "Once the download is finished, press Enter to continue..."
@ -11,12 +12,16 @@ else
unzip -q "$1" -d ~/Downloads/DaVinci_Resolve unzip -q "$1" -d ~/Downloads/DaVinci_Resolve
rm -f "$1" rm -f "$1"
fi fi
if [[ -f ~/Downloads/DaVinci_Resolve ]]; then
chmod +x ~/Downloads/DaVinci_Resolve/*.run
sudo SKIP_PACKAGE_CHECK=1 ~/Downloads/DaVinci_Resolve/*.run
sudo mkdir -p /opt/resolve/libs/disabled-libraries/
sudo mv /opt/resolve/libs/libglib* /opt/resolve/libs/disabled-libraries
sudo mv /opt/resolve/libs/libgio* /opt/resolve/libs/disabled-libraries
sudo mv /opt/resolve/libs/libgmodule* /opt/resolve/libs/disabled-libraries
rm -rf ~/Downloads/DaVinci_Resolve
echo "DaVinci Resolve installed successfully!"
else
echo "Installation failed! Does ~/Downloads/DaVinci_Resolve exist?"
fi
chmod +x ~/Downloads/DaVinci_Resolve/*.run
sudo SKIP_PACKAGE_CHECK=1 ~/Downloads/DaVinci_Resolve/*.run
sudo mkdir -p /opt/resolve/libs/disabled-libraries/
sudo mv /opt/resolve/libs/libglib* /opt/resolve/libs/disabled-libraries
sudo mv /opt/resolve/libs/libgio* /opt/resolve/libs/disabled-libraries
sudo mv /opt/resolve/libs/libgmodule* /opt/resolve/libs/disabled-libraries
rm -rf ~/Downloads/DaVinci_Resolve