[BUGFIX (untested)] fix current directory removal
Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
This commit is contained in:
parent
b749a05473
commit
0f7a6a88ef
1 changed files with 4 additions and 5 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue