mirror of
https://github.com/aminnairi/dotfiles.git
synced 2026-09-14 16:52:12 +02:00
preventing package installation if a package does not exist
This commit is contained in:
+10
-3
@@ -101,10 +101,17 @@ function ensure_package_is_installed() {
|
|||||||
if ! is_installed "$1"
|
if ! is_installed "$1"
|
||||||
then
|
then
|
||||||
log "Installation de $1..."
|
log "Installation de $1..."
|
||||||
yay -S --noconfirm --needed "$1"
|
if ! yay -S --noconfirm --needed "$1"
|
||||||
else
|
then
|
||||||
log "Paquet $1 déjà installé."
|
log "Echec lors de l'installation de $1."
|
||||||
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
log "Paquet $1 installé avec succès."
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
log "Paquet $1 déjà installé."
|
||||||
}
|
}
|
||||||
|
|
||||||
function ensure_package_group_is_installed() {
|
function ensure_package_group_is_installed() {
|
||||||
|
|||||||
Reference in New Issue
Block a user