[Top][All Lists]

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

Re: [Gnu-arch-users] Efficiently find out if <file> is source or not

From: Cameron Patrick
Subject: Re: [Gnu-arch-users] Efficiently find out if <file> is source or not
Date: Sun, 14 Mar 2004 12:38:12 +0800
User-agent: Mutt/

Stefan Monnier wrote:

| How can I do that efficiently [ i.e. in constant time ] ?
| Ideally this should work even if tla is not installed.

You would need to (a) parse {arch}=tagging-method; (b) make sure it
matches the source regexp and not the unrecognised one; (c) depending
on the tagging method, look for an arch-tag: in the file, or a
.arch-ids/$, or whatever.

A quick and nasty method would be to do only the last check, I

| The only way I could come up with is to do something akin to:
|     tla inventory -s `dirname $file` | grep $file
| but this can take a long time.

It's guaranteed to work the same way as tla does though :-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]