diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-11-19 13:31:11 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-11-19 13:31:11 -0200 |
commit | aafa6303f1c2c1da0eabce337722a82f55521546 (patch) | |
tree | 34ff7c0ae23577a73e24f4530406e70e5b8017bf | |
parent | 43ef7027c755ce37c49660906ee8f4ac81eada4c (diff) | |
download | metadot-aafa6303f1c2c1da0eabce337722a82f55521546.tar.gz metadot-aafa6303f1c2c1da0eabce337722a82f55521546.tar.bz2 |
Check for installed dependencies at metadot_deps
-rwxr-xr-x | metadot | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -107,13 +107,22 @@ function metadot_deps { local module="$1" local destname local dirname + local deps_to_install if [ -d "$MODULES/$module" ]; then echo "Resolving dependencies for $module.." if [ -e "/etc/debian_version" ] && [ -e "$MODULES/$module/dependencies/debian" ]; then deps="`grep -v '^#' $MODULES/$module/dependencies/debian | xargs`" - LC_ALL=C DEBIAN_FRONTEND=noninteractive sudo apt-get install -y $deps + + # Remove installed packages from list + for dep in $deps; do + if ! dpkg-query -W -f='${Status}' $dep | grep -q '^install ok'; then + deps_to_install="$deps_to_install $dep" + fi + done + + LC_ALL=C DEBIAN_FRONTEND=noninteractive sudo apt-get install -y $deps_to_install fi else |