Create directory with absolute path
This commit is contained in:
parent
ec6bb69c75
commit
0715932a44
1 changed files with 7 additions and 7 deletions
14
ccollect.sh
14
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 \
|
||||
|
|
Loading…
Reference in a new issue