Date: Tue, 22 Nov 2005 21:47:05 +0200 From: Jonathan <afarsec@012.net.il> To: FreeBSD-gnats-submit@FreeBSD.org Cc: edwin@FreeBSD.org Subject: ports/89432: Utility: A tool to identify similar pkg-descr files Message-ID: <0IQD00G66GQMQMB1@i_mtaout2.012.net.il> Resent-Message-ID: <200511222000.jAMK0rXU089642@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 89432 >Category: ports >Synopsis: Utility: A tool to identify similar pkg-descr files >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Nov 22 20:00:52 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Jonathan >Release: FreeBSD 6.0-BETA4 i386 >Organization: Mmmmm >Environment: System: FreeBSD who.by.firewall.com 6.0-BETA4 FreeBSD 6.0-BETA4 #4: Fri Sep 9 00:07:43 IDT 2005 root@who.by.waterfall.com:/usr/obj/usr/src/sys/GENERIC i386 >Description: This is a follow up to ports/89385. If it's getting lost, please reroute it. >How-To-Repeat: N/A >Fix: This will break if (when) we have more than 9,999,999,999 ports. --- badpd.sh begins here --- #!/bin/sh # Version 0.2 # This script is public domain, for any given public, in every type of domain. # onatan@gmail.com usage(){ echo "$0 [/usr/ports]" echo "Locates identical pkg-descr files" exit 1 } DIR=${1-/usr/ports} [ -d ${DIR} ] || usage find ${DIR} -name pkg-descr -exec md5 -r {} \; 2>/dev/null | \ sort | \ xargs -L 9999999999 | \ awk ' \ { size=split($0,arr," ") } \ { for (i=1; i<size; ++i) \ if ( arr[i] == arr[i+2] ) \ print arr[i+1] " == " arr[i+3] \ } \ ' --- badpd.sh ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0IQD00G66GQMQMB1>