From 9b06628bb53cc4e5ffd968ccae240d835cf92641 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 6 Dec 2005 12:50:36 +0100 Subject: [PATCH] minimal changes..or I forgot what to type --- ccollect.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/ccollect.sh b/ccollect.sh index 98e0352..2233cd3 100755 --- a/ccollect.sh +++ b/ccollect.sh @@ -36,14 +36,26 @@ for backup in $CCOLLECT_CONF/*; do echo "Ignoring $backup, is not a directory" continue fi + if [ ! -f "$c_source" ]; then - echo "Skipping: Source $c_source is not a file:" + echo "Skipping: Source $c_source is not a file" continue else - source=$(cat $c_source) || continue + source=$(cat $c_source) + if [ $? -ne 0 ]; then + echo "Skipping: Source $c_source is not readable" + continue + fi fi + if [ ! -d "$c_dest" ]; then echo "Skipping: Destination $c_dest does not link to a directory" continue fi + + if [ -f "$c_exclude" ]; then + echo "Skipping: Destination $c_dest does not link to a directory" + continue + fi + done