I developed a java application which is packaged for many platfor (including .deb / .rpm). In my app, there is a functionality to auto-upgrade. For Linux platform, it manages, to check if new version exist and to download the new .deb/.rpm. Now I have 2 options:
- a popup asking the user to close the app and to install the .deb/.rpm himself
- launch a script which close the app and install the .deb / .rpm itseld (similar to what is done under Windows and MacOS).
Is it possible to have a safe approach 2 for all debian/fedora derivatives? For example would a script as the following a good idea for Debian derivatives?
sudo apt install gdebi -y sudo gdbi [package path]
Thank you for your help.