Browse Source

fix: idem_apt_install detects uninstall

master
pvincent 3 years ago
parent
commit
1c3d308a99
  1. 2
      lib/functions.sh

2
lib/functions.sh

@ -5,7 +5,7 @@ function idem_apt_install() {
[ -z "${VERBOSE:-}" ] && VERBOSE=false
# || echo "VERBOSE is set to $VERBOSE"
for i in "$@"; do
if ! (/usr/bin/dpkg-query --status "$i" >/dev/null 2>&1); then
if ! dpkg -l "$i" 2>/dev/null | grep -q ^ii; then
sudo apt install -y "$i"
elif $VERBOSE; then
echo "apt package <$i> already installed!"

Loading…
Cancel
Save