[tex-live] mktexlsr should exclude more VCS dirs
Zdenek Wagner
zdenek.wagner at gmail.com
Fri May 16 12:26:45 CEST 2008
2008/5/16 David Kastrup <dak at gnu.org>:
> 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
>
CVS contains just a few files, namely Entries, Repository, Root,
Template. There is just a small risk of filename clash with something
meaningful. CVS contents are currently included in ls-R and I have not
found any problem so far while svn and git may cause problems.
> --
> David Kastrup
>
--
Zdeněk Wagner
http://hroch486.icpf.cas.cz/wagner/
http://icebearsoft.euweb.cz
More information about the tex-live
mailing list