Allan McRae wrote:
> Hi,
> 
> I attach a script tentatively called "repopkg" that lists all packages 
> installed from a given repo. I find this useful for monitoring what I 
> have installed from [testing]. It is not entirely fool proof as it 
> assumes you have installed packages using "pacman -S pkg" and not 
> "pacman -S repo/pkg".
> 
> A couple of queries. Can someone come up with a better name which is not 
> too long?  And any comments before I submit the for inclusion in the 
> contrib directory (it is best to come as a git patch right?).
> Cheers,
> Allan
> 
        [snip]

Well, I made the following changes to speed it up by 40%:

39c39
< pacman -Sl > $pkglist
---
 > pacman -Sl | grep "^$1" > $pkglist
42c42
<   match=$(grep -m1 " $pkg " $pkglist | grep "^$1")
---
 >   match=$(grep -m1 " $pkg " $pkglist)


_______________________________________________
pacman-dev mailing list
[email protected]
http://archlinux.org/mailman/listinfo/pacman-dev

Reply via email to