removed [[ TEST ]] && action form for if [[ TEST ]]; then action; fi for compatibility

This commit is contained in:
levasseur
2021-09-08 17:52:16 +02:00
parent bec63a5304
commit d8c1dfddd6
13 changed files with 61 additions and 42 deletions

View File

@@ -18,9 +18,10 @@ export VER_install_pkg="0.1.1"
install_pkg()
{
# Remove unnecessary packages
[[ -n $PKGS_RMLIST ]] &&
prnt I "Suppression de paquets supperflus..." &&
if [[ -n $PKGS_RMLIST ]]; then
prnt I "Suppression de paquets supperflus..."
pkgrem $PKGS_RMLIST
fi
# Blacklist some anoying packages (and remove them if needed)
if [[ -n PKGS_BLACKLIST ]]; then
@@ -36,10 +37,11 @@ install_pkg()
fi
# Install all the configured packages
[[ -n $PKGSEL ]] &&
prnt I "Installation de la sélection de paquets..." &&
if [[ -n $PKGSEL ]]; then
prnt I "Installation de la sélection de paquets..."
pkginst $PKGSEL
fi
# Cleaning
prnt I "Suppression des paquets résiduels le cas échéant..."
pkgautorem
@@ -52,8 +54,11 @@ precheck_install_pkg()
else
prnt I "$(echo $PKGS_RMLIST | wc -w) paquets à supprimer."
fi
[[ -z PKGS_BLACKLIST ]] &&
if [[ -z PKGS_BLACKLIST ]]; then
prnt W "Les paquets $pkg seront placés en liste noire !"
fi
if [[ -z $PKGSEL ]]; then
prnt W "Pas de paquet additionel à installer !"
else