Closed bigpod98 closed 4 years ago
With this code I cannot install a different Desktop Environment from the one I have previously installed right? Maybe we just want to check if (example) the mate desktop is already installed and prevent the re-installation without the -force option.
I would suggest changes to something like this
if [ "$(apt list --installed | grep $DESKTOP_ENVIRONMENT)" ] && [ "$FORCE" == 0 ]; then
echo "[!] ERROR: Desktop already installed. To force install use -force or --force flags."
--force flag should allow you to install another deskto-environment unless it has a bug which could also be the case(probably)
Thanks for contributing :smiley: I'll take this as is, but will be refactoring slightly to address the observation from @abacao.
@flexiondotorg what i wanted to make is that people do not "bloat up" their system or remove the old desktop environment unless they absolutly want it
added check to see if a desktop is already installed also added a flag to check if user wants to force install desktop