summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorGravatar Mike Burns <mike@mike-burns.com>2015-11-20 14:21:02 +0100
committerGravatar Mike Burns <mike@mike-burns.com>2015-11-20 14:22:11 +0100
commita68804713a6cb9eb96278df597fd0b4fefc36598 (patch)
treef813d00249161824b96d5e8c8629559369c85aa6 /bin
parent4cd7fd891c80169188705243bb2fdba44bb1edbe (diff)
rcdn(1) recurs until home dir, not root
rcdn(1) will try to remove a file; if it is not a dotfile, it will keep going up until it found one. However, we should stop at `$DEST_DIR` (`$HOME`) -- nothing is relevant to us above there. Closes #169.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/rcdn.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/rcdn.in b/bin/rcdn.in
index ae7aad8..a2a8472 100755
--- a/bin/rcdn.in
+++ b/bin/rcdn.in
@@ -8,7 +8,9 @@ remove_link() {
local original="$2"
local sigil="$3"
- if [ "x$dest" = "x/" ]; then
+ $DEBUG "remove_link $1 $2 $3"
+
+ if [ "x$dest" = "x/" -o "x$dest" = "x$DEST_DIR" ]; then
$VERBOSE "not a symlink, skipping: $original"
elif [ -L "$dest" -o "x$sigil" = "xX" ]; then
rm_v -rf "$dest"