updates nuke script
This commit is contained in:
@@ -1,28 +1,44 @@
|
||||
default_version="15.1v3"
|
||||
#!/usr/bin/env bash
|
||||
|
||||
echo "Please enter version number (default ${default_version}):"
|
||||
read version
|
||||
download_from_source=$1
|
||||
|
||||
version=$2
|
||||
|
||||
if [ -z "$version" ]; then
|
||||
version=${default_version}
|
||||
version="15.1v3"
|
||||
fi
|
||||
|
||||
vnum="${version%%v*}"
|
||||
# echo "Version num:${vnum}"
|
||||
|
||||
installer_path=~/Downloads/Nuke${version}-linux-x86_64.run
|
||||
# installer_path=./Nuke${version}-linux-x86_64.run
|
||||
url=https://public.noisyserver.sbs/vfx-installers/Nuke${version}-linux-x86_64.run
|
||||
|
||||
read -p "Make sure the installer is located at '${installer_path}'. Press Enter to continue, or n to cancel..." answer
|
||||
echo "${url} -> ${installer_path}"
|
||||
if [ -z "$download_from_source" ]; then
|
||||
read -p "Download for Nuke ${version} will start. If file is already downloaded enter 's', or 'c' to cancel: " download_from_source
|
||||
fi
|
||||
|
||||
case $answer in
|
||||
[Nn]*)
|
||||
delete_installer=0
|
||||
|
||||
case $download_from_source in
|
||||
[Ss]*)
|
||||
echo "Skipped download"
|
||||
;;
|
||||
[Cc]*)
|
||||
echo "Installation cancelled"
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "Running installer..."
|
||||
echo "Downloading Nuke Installer..."
|
||||
curl -# -o ${installer_path} ${url}
|
||||
echo "Done"
|
||||
delete_installer=1
|
||||
;;
|
||||
esac
|
||||
|
||||
sudo chmod +x ${installer_path}
|
||||
# sudo ${installer_path}
|
||||
|
||||
sudo ${installer_path} --accept-foundry-eula
|
||||
|
||||
echo "Moving application to bin directory..."
|
||||
@@ -36,13 +52,23 @@ sudo dnf install libxcrypt-compat -y
|
||||
|
||||
echo "Creating Application shortcut..."
|
||||
sudo mkdir -p ~/.local/share/applications/
|
||||
sudo chmod -R 777 ~/.local/share/applications/
|
||||
sudo chmod -r 777 ~/.local/share/applications/
|
||||
cd ~/.local/share/applications/
|
||||
echo "#!/usr/bin/env xdg-open
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Name=Nuke ${vnum}
|
||||
Exec=/usr/bin/Nuke/Nuke${version}/Nuke${vnum} --indie
|
||||
Icon=/usr/bin/Nuke/nuke.png" >nuke${version}.desktop
|
||||
[desktop entry]
|
||||
version=1.0
|
||||
terminal=false
|
||||
type=application
|
||||
name=nuke ${version}
|
||||
exec=/usr/bin/nuke/nuke${version}/nuke${vnum} --indie
|
||||
icon=/usr/bin/nuke/nuke.png" >nuke${version}.desktop
|
||||
|
||||
if ${delete_installer} = 1; then
|
||||
echo "deleting downloaded installer..."
|
||||
rm ${installer_path}
|
||||
else
|
||||
echo "leaving previously-existing installer in place..."
|
||||
fi
|
||||
echo "Cleanup..."
|
||||
sudo rm -r ./Nuke${version}
|
||||
echo "Nuke installation script finished"
|
||||
|
||||
Reference in New Issue
Block a user