Create directory with absolute path

This commit is contained in:
Nico Schottelius 2006-10-15 16:33:32 +02:00
parent ec6bb69c75
commit 0715932a44
1 changed files with 7 additions and 7 deletions

View File

@ -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 \