mirror of
https://github.com/aminnairi/dotfiles.git
synced 2026-11-13 11:19:09 +01:00
preventing package installation if a package does not exist
This commit is contained in:
1 parent
545b1e1cc0
commit
84629eeaee
1 file changed
+10
-3
+10
-3
@@ -101,10 +101,17 @@ function ensure_package_is_installed() {
|
||||
if ! is_installed "$1"
|
||||
then
|
||||
log "Installation de $1..."
|
||||
yay -S --noconfirm --needed "$1"
|
||||
else
|
||||
log "Paquet $1 déjà installé."
|
||||
if ! yay -S --noconfirm --needed "$1"
|
||||
then
|
||||
log "Echec lors de l'installation de $1."
|
||||
return 1
|
||||
fi
|
||||
|
||||
log "Paquet $1 installé avec succès."
|
||||
return 0
|
||||
fi
|
||||
|
||||
log "Paquet $1 déjà installé."
|
||||
}
|
||||
|
||||
function ensure_package_group_is_installed() {
|
||||
|
||||
Reference in new issue
Block a user