summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMat M <matm@gmx.fr>2019-12-03 23:34:09 +0100
committerMike Burns <mburns@thoughtbot.com>2020-08-28 14:00:46 -0400
commit458d55474ed3965a87ff414bbc07d85a3b300bfb (patch)
tree3e985d49b83f05ac993c995eeeadae863659aa0a
parent9ab7c6f0125373acecbfbce3c31d65de90380130 (diff)
Fix #237
Fix $ sigil for lsrc -F Add test
-rw-r--r--NEWS.md.in1
-rwxr-xr-xbin/lsrc.in2
-rw-r--r--test/lsrc-sigils.t9
3 files changed, 11 insertions, 1 deletions
diff --git a/NEWS.md.in b/NEWS.md.in
index 4461a2f..859f2a8 100644
--- a/NEWS.md.in
+++ b/NEWS.md.in
@@ -1,5 +1,6 @@
rcm (@PACKAGE_VERSION@) unstable; urgency=low
+ * BUGFIX: Fix #237 - $ for symlinked dirs with lsrc -F (Mathias Michel).
* Fix #144 and more: all symlinks in input are rejected (Mat M)
-- Mike Burns <mburns@thoughtbot.com> Fri, 13 Jul 2018 14:12:00 -0500
diff --git a/bin/lsrc.in b/bin/lsrc.in
index eed4c0a..7a531f0 100755
--- a/bin/lsrc.in
+++ b/bin/lsrc.in
@@ -144,7 +144,7 @@ handle_file() {
elif is_excluded "$dotfiles_subdir/$file" "$exclude_file_globs" "$include_file_globs"; then
$VERBOSE "skipping excluded file $file"
elif [ -d "$file" ] && is_excluded "$dotfiles_subdir/$file" "$symlink_dirs_file_globs" "$mk_dirs_file_globs"; then
- show_file "$file" "$dest_dir" "$dotfiles_dir" "$dotfiles_subdir" $dotted
+ show_file "$file" "$dest_dir" "$dotfiles_dir" "$dotfiles_subdir" $dotted "$symlink_dirs_file_globs"
elif [ -d "$file" ]; then
show_dir "$file" "$dest_dir" "$dotfiles_dir" "$dotfiles_subdir" $dotted "$exclude_file_globs" "$include_file_globs" "$symlink_dirs_file_globs" "$mk_dirs_file_globs"
else
diff --git a/test/lsrc-sigils.t b/test/lsrc-sigils.t
index 98573b2..9bdc82d 100644
--- a/test/lsrc-sigils.t
+++ b/test/lsrc-sigils.t
@@ -14,3 +14,12 @@ Should print X for files in COPY_ALWAYS
$ COPY_ALWAYS=copy lsrc -F
/*/.copy:/*/.dotfiles/copy:X (glob)
/*/.example:/*/.dotfiles/example:@ (glob)
+
+Should print $ for directory links
+
+ $ mkdir .dotfiles/folder
+
+ $ SYMLINK_DIRS=folder COPY_ALWAYS=copy lsrc -F
+ /*/.copy:/*/.dotfiles/copy:X (glob)
+ /*/.example:/*/.dotfiles/example:@ (glob)
+ /*/.folder:/*/.dotfiles/folder:$ (glob)