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.
Use of
apt
in scripts is discouraged since it is meant as a user facing tool and is subject to interface change.apt-get
andapt
are currently used at different points in desktopify. This PR changes all instances ofapt install
toapt-get install
.In addition the check for already installed packages is changed to use
dpkg
which besides eliminating the discouragedapt
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 sodpkg
is only run if the force option is not set.