[BUGFIX (untested)] fix current directory removal

Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
This commit is contained in:
Nico Schottelius 2009-08-20 09:49:47 +02:00
parent b749a05473
commit 0f7a6a88ef

View file

@ -71,7 +71,6 @@ while [ $# -gt 0 ]; do
_exit_err "Unknown option: $1" _exit_err "Unknown option: $1"
;; ;;
esac esac
fi fi
# Reached here? So there are no more parameters. # Reached here? So there are no more parameters.
@ -97,13 +96,13 @@ while [ $# -gt 0 ]; do
if [ "$backups" ]; then if [ "$backups" ]; then
ddir="$(cat "${fullname}/destination")" ddir="$(cat "${fullname}/destination")"
addir="$(cd && pwd -P)" || _exit_err "Cannot change to ${ddir}" absdir="$(cd "${ddir}" && pwd -P)" || _exit_err "Cannot change to ${ddir}"
_echo "Deleting ${addir} ..." _echo "Deleting ${absdir} ..."
rm -r $force "${addir}" echo rm -r $force "${absdir}"
fi fi
_echo "Deleting ${fullname} ..." _echo "Deleting ${fullname} ..."
rm -r $force "${fullname}" echo rm -r $force "${fullname}"
done done
exit 0 exit 0