wimpysworld / desktopify

Convert Ubuntu Server for Raspberry Pi into a Desktop
https://www.youtube.com/watch?v=umtZuUJOU38
MIT License
520 stars 89 forks source link

Remove use of apt #49

Open tssva opened 4 years ago

tssva commented 4 years ago

Use of apt in scripts is discouraged since it is meant as a user facing tool and is subject to interface change. apt-get and apt are currently used at different points in desktopify. This PR changes all instances of apt install to apt-get install.

In addition the check for already installed packages is changed to use dpkg which besides eliminating the discouraged apt also provides the advantage of returning the status of whether the packages are installed via the exit code so grepping output is not needed. I also reversed the order of the checks so dpkg is only run if the force option is not set.