From f369ef0805b3c0a6ad908e4e801c0c572b96716b Mon Sep 17 00:00:00 2001 From: Mike Burns Date: Sat, 27 Jul 2013 20:19:32 -0400 Subject: Handle relative dotfiles directories The `lsrc` command (and thus the other commands, too) now supports passing a relative directory name to `-d`. Previously, this caused only the non-host and non-tag directories to run; now all dotfiles directories are run for all metafiles, too. As an example, this now works correctly: lsrc -d dotfiles This still works, too: lsrc -d /home/mike/dotfiles --- bin/lsrc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/lsrc b/bin/lsrc index 972f54f..766aa2f 100755 --- a/bin/lsrc +++ b/bin/lsrc @@ -150,6 +150,10 @@ fi for DOTFILES_DIR in $DOTFILES_DIRS; do + if echo $DOTFILES_DIR | grep -vq '^/'; then + DOTFILES_DIR=$PWD/$DOTFILES_DIR + fi + if [ ! -d $DOTFILES_DIR ]; then $VERBOSE "skipping non-existent directory: $DOTFILES_DIR" continue -- cgit v1.2.3