[util] add check_pkg()

merge-requests/273/head
Bernhard Landauer 7 years ago
parent ef1980a172
commit 64c9bd00c0

@ -341,6 +341,12 @@ check_base() {
fi
}
# install a pkg in the live session if not installed
inst_needed() {
[[ ! $(pacman -Q $1 2>/dev/null) ]] && pacman -Sy --noconfirm $1
}
# install a pkg in the chroot if not installed
check_pkg() {
arch_chroot "[[ ! $(pacman -Q $1 2>/dev/null) ]] && pacman -Sy --noconfirm $1" 2>$ERR
}

Loading…
Cancel
Save