Sort specific category by added date?

Sam Lawrance boris at brooknet.com.au
Wed Jan 12 02:18:03 PST 2005


Scott I. Remick wrote:

>Is there a way (web-based or command-line) to get a list of all the ports in
>a specific category sorted by their added (not modified/updated) date?
>
>For example: I want a list of all the games, sorted by those added most
>recently first.
>
>I can't seem to come up with a trick, but then again, I'm not all that
>skilled (but still learning!)...
>
>Thanks!
>_______________________________________________
>freebsd-ports at freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-ports
>To unsubscribe, send any mail to "freebsd-ports-unsubscribe at freebsd.org"
>
>
>  
>
I was going to suggest looking at the "Date created" which is at the top 
of just about every port Makefile, but there are spelling errors and the 
format varies a little.

Something like the following might help. It extracts the date that the 
first revision of the Makefile was added. You'll need a copy of the 
ports tree with which you can use 'cvs'. Run it inside a category directory.

cd /usr/ports/games
for i in *; do
    echo -n `cvs log -r1.1 $i/Makefile | grep "date:" | cut -c 7-25`; 
echo " $i";
done | sort

Needs a bit of tweaking, but you get the idea. The output for 'games' is 
at http://sam.stral.net/freebsd/games-added-date.txt

-- 
Sam Lawrance    ph +61 0425 228 579    freenode: deft



More information about the freebsd-ports mailing list