From 0715932a44d9f1b1306cd93e8501208ec05dc7dd Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 15 Oct 2006 16:33:32 +0200 Subject: [PATCH] Create directory with absolute path --- ccollect.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ccollect.sh b/ccollect.sh index 91675b3..fab21c1 100755 --- a/ccollect.sh +++ b/ccollect.sh @@ -381,13 +381,7 @@ while [ "$i" -lt "$no_sources" ]; do # # make an absolute path, perhaps $CCOLLECT_CONF is relative! # - abs_destination_dir=$(cd $destination_dir; pwd -P) - - # only copy if a directory exists - if [ "$last_dir" ]; then - last_dir=$(cd "$last_dir"; pwd -P) - rsync_hardlink="--link-dest=\"$last_dir\"" - fi + abs_destination_dir="$(cd $destination_dir; pwd -P)" # # the rsync part @@ -398,6 +392,12 @@ while [ "$i" -lt "$no_sources" ]; do set -x + # Clone from previous backup, if existing + if [ "$last_dir" ]; then + last_dir="$(cd "$last_dir"; pwd -P)" + rsync_hardlink="--link-dest=\"$last_dir\"" + fi + rsync -a --delete --numeric-ids --relative --delete-excluded \ $rsync_hardlink \ $VERBOSE $EXCLUDE $SUMMARY $RSYNC_EXTRA \