From 85e16216d4f95a3986ce18d3e5a4a5ed431a4ad5 Mon Sep 17 00:00:00 2001 From: The Linux Kitten Date: Sun, 9 Mar 2014 21:22:02 +0100 Subject: Add support for -v option on OpenBSD The `-v` (verbose) flag for `cp`, `ln`, and `rm` is not standard. It is simple to implement using shell functions, so introduce `cp_v`, `ln_v`, and `rm_v`. These shell functions use the existing `$VERBOSE` variable for printing, which simplifies the code and reduces the number of variables. Fixes #61. --- bin/rcdn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin/rcdn') diff --git a/bin/rcdn b/bin/rcdn index 3550a30..2caa340 100755 --- a/bin/rcdn +++ b/bin/rcdn @@ -11,7 +11,7 @@ remove_link() { if [ "x$dest" = "x/" ]; then $VERBOSE "not a symlink, skipping: $original" elif [ -L "$dest" -o "x$sigil" = "xX" ]; then - $RM -rf "$dest" + rm_v -rf "$dest" rmdir -p "$(dirname "$original")" 2>/dev/null else remove_link "$(dirname "$dest")" "$original" -- cgit v1.2.3