Improve check_pkg

This commit is contained in:
Chrysostomus 2017-02-23 01:12:24 +08:00
parent 847a336923
commit 5b05ea3e4f

View File

@ -356,5 +356,8 @@ inst_needed() {
# install a pkg in the chroot if not installed # install a pkg in the chroot if not installed
check_pkg() { check_pkg() {
[[ -e "/mnt/usr/bin/$1" ]] || echo "$1 is not installed." && echo && echo && echo "Press enter to continue" && read if ! arch_chroot "pacman -Q $1" ; then
basestrap "$1" 2>$ERR
check_for_error "install missing pkg $1 to target." "$?"
fi
} }