[tex-live] mktexlsr should exclude more VCS dirs
David Kastrup
dak at gnu.org
Fri May 16 11:52:51 CEST 2008
Norbert Preining <preining at logic.at> writes:
> We got the following suggestion concerning mktexlsr:
>
> On Do, 15 Mai 2008, Michael Schutte wrote:
>> /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 at 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"
>
>
> THis patch actually looks quite reasonable to me, so what about
> including it in our texlive repository?
>
> Any comments/remarks/objections please?
What about CVS and RCS subdirectories (no initial dot in their name)?
Also it may be more efficient to not have alternatives starting with a
common character, something like
\.\(bzr\|git\|hg\|svn\)\|CVS\|RCS\|_darcs
--
David Kastrup
More information about the tex-live
mailing list