[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#481371: texlive-base-bin: mktexlsr should exclude more VCS dirs



Package: texlive-base-bin
Version: 2007.dfsg.1-3
Severity: wishlist
Tags: patch

Hi,

/usr/bin/mktexlsr currently excludes .svn directories only.  I’d like to
maintain parts of my ~/texmf tree in Git, which badly clutters ls-R at
the moment.  The attached patch supports the most usual DVCSes; it would
be great if you could review and probably apply it for the next
revision.

Cheers,
-- 
Michael Schutte <m.schutte.jr@gmail.com>
--- a/mktexlsr	2008-04-22 19:37:01.000000000 +0200
+++ b/mktexlsr	2008-05-15 17:08:59.000000000 +0200
@@ -154,10 +154,11 @@
   # We do not try to support colons in directory names.
   # 
   echo "./:" >>"$db_file_tmp"
+  VCSDIRS='\(\.svn\|\.git\|\.bzr\|\.hg\|_darcs\)'
   (cd "$TEXMFLS_R" && \ls -LRa 2>/dev/null) \
-   | sed -e '/^$/{n;s%^\./%%;s%^%./%;}; /^\.$/d; /^\.\.$/d; /^\.svn$/d;' \
+   | sed -e '/^$/{n;s%^\./%%;s%^%./%;}; /^\.$/d; /^\.\.$/d; /^'$VCSDIRS'$/d;' \
         -e '/^[\.\/]*lsR[0-9]*\.tmp:*$/d' \
-   | sed -e '/\.svn.*:$/,/^$/d' \
+   | sed -e '/'$VCSDIRS'.*:$/,/^$/d' \
    >>"$db_file_tmp"
 
   cat "$db_file_tmp" > "$db_file"

Attachment: signature.asc
Description: Digital signature


Reply to: