Create directory with absolute path

This commit is contained in:
Nico Schottelius 2006-10-15 16:33:32 +02:00
parent ec6bb69c75
commit 0715932a44

View file

@ -381,13 +381,7 @@ while [ "$i" -lt "$no_sources" ]; do
# #
# make an absolute path, perhaps $CCOLLECT_CONF is relative! # make an absolute path, perhaps $CCOLLECT_CONF is relative!
# #
abs_destination_dir=$(cd $destination_dir; pwd -P) 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
# #
# the rsync part # the rsync part
@ -398,6 +392,12 @@ while [ "$i" -lt "$no_sources" ]; do
set -x 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 -a --delete --numeric-ids --relative --delete-excluded \
$rsync_hardlink \ $rsync_hardlink \
$VERBOSE $EXCLUDE $SUMMARY $RSYNC_EXTRA \ $VERBOSE $EXCLUDE $SUMMARY $RSYNC_EXTRA \