File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -610,9 +610,15 @@ try_install_pkgs() {
610610
611611# Install packages using apt-get
612612apt_get_install_pkgs () {
613- if ! dpkg-query -W " $@ " | grep -v ' ^\S\+\s\+.\+$' > /dev/null; then
613+ missing=
614+ for pkg in $* ; do
615+ if ! dpkg -s $pkg 2> /dev/null | grep ' ^Status:.*installed' > /dev/null; then
616+ missing=" $missing $pkg "
617+ fi
618+ done
619+ if [ " $missing " = " " ]; then
614620 info " Already installed!"
615- elif ! sudocmd " install required system dependencies" apt-get install -y ${QUIET: +-qq} " $@ " ; then
621+ elif ! sudocmd " install required system dependencies" apt-get install -y ${QUIET: +-qq} $missing ; then
616622 die " Installing apt packages failed. Please run 'apt-get update' and try again."
617623 fi
618624}
You can’t perform that action at this time.
0 commit comments