aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmetadot13
1 files changed, 11 insertions, 2 deletions
diff --git a/metadot b/metadot
index 35b85ae..9bcb9bb 100755
--- 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,16 @@ 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
+ # This generates less output, but might fail entirely if at least one
+ # package has no candidates for installation.
+ #LC_ALL=C DEBIAN_FRONTEND=noninteractive sudo apt-get install -y $deps_to_install
+
+ # This is more fault-tolerant
+ for dep in $deps_to_install; do
+ LC_ALL=C DEBIAN_FRONTEND=noninteractive sudo apt-get install -y $dep
+ done
+ fi
fi
else