From 63b50643b0ffd287d0070e494625056a05081ce8 Mon Sep 17 00:00:00 2001 From: Mike Burns Date: Sun, 4 Aug 2013 10:35:14 -0400 Subject: Introduce exclusion patterns The lsrc(1), rcup(1), and rcdn(1) commands now take any number of `-e` flags, used to specify an exclusion pattern. This can also be controlled via rcrc(5), the `EXCLUDES` variable. An exclusion pattern specifies a file glob to skip. In the case of lsrc(1), any file matching the glob is not listed; in rcup(1) it is not symlinked; and in rcdn(1) it is not removed. The file glob can be preceded by the name of a dotfiles directory (separated from the file glob by a colon) to increase the specificity. Useful for: rcdn -e rcrc rcup -d work-dotfiles -e bashrc rcup -d ~/.dotfiles -d wife-dotfiles -d sys-dotfiles -e wife-dotfiles:tigrc --- share/rcm.sh.in | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'share/rcm.sh.in') diff --git a/share/rcm.sh.in b/share/rcm.sh.in index f25665b..6dae15b 100644 --- a/share/rcm.sh.in +++ b/share/rcm.sh.in @@ -28,6 +28,14 @@ echo_error() { exit $exit_status } +echo_stderr() { + echo $* >&2 +} + +is_relative() { + echo $1 | grep -vq '^/' +} + version() { cat << EOV $1 (rcm) $VERSION @@ -47,7 +55,7 @@ handle_common_flags() { version $prog_name exit 0 elif [ $verbosity -ge 2 ]; then - DEBUG=echo + DEBUG=echo_stderr VERBOSE=echo PRINT=echo MV="$MV -v" -- cgit v1.2.3