]> gitweb.fluxo.info Git - metadot.git/commitdiff
Fix: check if there are uninstalled dependencies before trying to install them
authorSilvio Rhatto <rhatto@riseup.net>
Sat, 5 Dec 2020 23:35:31 +0000 (20:35 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sat, 5 Dec 2020 23:35:31 +0000 (20:35 -0300)
metadot

diff --git a/metadot b/metadot
index 35b85ae168daa99173c220126f93419212e5ba74..de18148f70dd48ff7e8bc4e2fae7adb081ac99f4 100755 (executable)
--- a/metadot
+++ b/metadot
@@ -45,7 +45,7 @@ GIT="/usr/bin/git"
 # Backup a file
 function metadot_backup {
   local file="$DEST/$1"
-  
+
   if [ -e "$file" ] || [ -h "$file" ]; then
     local folder="$BACKUPS/`dirname $1`"
 
@@ -123,7 +123,9 @@ function metadot_deps {
         fi
       done
 
-      LC_ALL=C DEBIAN_FRONTEND=noninteractive sudo apt-get install -y $deps_to_install
+      if [ ! -z "$deps_to_install" ]; then
+        LC_ALL=C DEBIAN_FRONTEND=noninteractive sudo apt-get install -y $deps_to_install
+      fi
     fi
 
   else