From 0f7a6a88efd607a8d1f8dd57b06664cfc74aa387 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 20 Aug 2009 09:49:47 +0200 Subject: [PATCH] [BUGFIX (untested)] fix current directory removal Signed-off-by: Nico Schottelius --- tools/ccollect_delete_source.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/ccollect_delete_source.sh b/tools/ccollect_delete_source.sh index 636ce67..509e95f 100755 --- a/tools/ccollect_delete_source.sh +++ b/tools/ccollect_delete_source.sh @@ -71,7 +71,6 @@ while [ $# -gt 0 ]; do _exit_err "Unknown option: $1" ;; esac - fi # Reached here? So there are no more parameters. @@ -97,13 +96,13 @@ while [ $# -gt 0 ]; do if [ "$backups" ]; then ddir="$(cat "${fullname}/destination")" - addir="$(cd && pwd -P)" || _exit_err "Cannot change to ${ddir}" - _echo "Deleting ${addir} ..." - rm -r $force "${addir}" + absdir="$(cd "${ddir}" && pwd -P)" || _exit_err "Cannot change to ${ddir}" + _echo "Deleting ${absdir} ..." + echo rm -r $force "${absdir}" fi _echo "Deleting ${fullname} ..." - rm -r $force "${fullname}" + echo rm -r $force "${fullname}" done exit 0