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