From e71146dbbf67e3ca3975f0ce58a5dabd19e7b7b4 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 17 Aug 2007 15:45:21 +0200 Subject: [PATCH] Create destination on real path --- doc/CHANGES | 3 +++ tools/add_ccollect_source.sh | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/doc/CHANGES b/doc/CHANGES index c7ec0ae..1bd429f 100644 --- a/doc/CHANGES +++ b/doc/CHANGES @@ -1,3 +1,6 @@ +0.6 to 0.6.1: + * Added check for destination_base in add_ccollect_source.sh + 0.5.2 to 0.6: * Always print return code of rsync * Add much more timing information diff --git a/tools/add_ccollect_source.sh b/tools/add_ccollect_source.sh index 7a238f5..ec8e40a 100755 --- a/tools/add_ccollect_source.sh +++ b/tools/add_ccollect_source.sh @@ -89,8 +89,13 @@ while [ $# -gt 0 ]; do echo "${source_source}" > "${fullname}/source" # create destination directory - dest="${destination_base}/${source}" - _echo "Creating destination ${dest} ..." + _echo "Creating destination ..." + + absbase=$(cd "${destination_base}" 2>/dev/null && pwd -P) || \ + _exit_err "${destination_base} should exist before creating sources." + + dest="${absbase}/${source}" + _echo "Creating ${dest} ..." mkdir -p "${dest}" || _exit_err "${dest}: Cannot create." # link destination directory