ports/89432: Utility: A tool to identify similar pkg-descr files
Jonathan
afarsec at 012.net.il
Tue Nov 22 20:01:14 UTC 2005
>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 at 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 at 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:
More information about the freebsd-ports-bugs
mailing list