From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QWaGp-0005ra-A4 for garchives@archives.gentoo.org; Tue, 14 Jun 2011 20:31:31 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8751F1C1C8; Tue, 14 Jun 2011 20:31:23 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 59F9E1C1C8 for ; Tue, 14 Jun 2011 20:31:23 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8D28E1B4020 for ; Tue, 14 Jun 2011 20:31:22 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id E323D8003C for ; Tue, 14 Jun 2011 20:31:21 +0000 (UTC) From: "Matt Turner" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matt Turner" Message-ID: <6057455d53b08d85883d80e83578940cc821bb43.mattst88@gentoo> Subject: [gentoo-commits] proj/qa-scripts:master commit in: / X-VCS-Repository: proj/qa-scripts X-VCS-Files: find-binary-files.pl X-VCS-Directories: / X-VCS-Committer: mattst88 X-VCS-Committer-Name: Matt Turner X-VCS-Revision: 6057455d53b08d85883d80e83578940cc821bb43 Date: Tue, 14 Jun 2011 20:31:21 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: cb0016e3000bede7870ab7c0118cb4d8 commit: 6057455d53b08d85883d80e83578940cc821bb43 Author: Matt Turner gmail com> AuthorDate: Tue Jun 14 20:08:13 2011 +0000 Commit: Matt Turner gmail com> CommitDate: Tue Jun 14 20:31:14 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/qa-scripts.gi= t;a=3Dcommit;h=3D6057455d add a script to find binary and empty files in portage --- find-binary-files.pl | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/find-binary-files.pl b/find-binary-files.pl new file mode 100755 index 0000000..0d32c9e --- /dev/null +++ b/find-binary-files.pl @@ -0,0 +1,16 @@ +#!/usr/bin/perl + +# Matt Turner +# June 2010. For qa-reports.gentoo.org. + +use strict; +use warnings; + +use File::Find; + +sub wanted { + !-d && ((-z && print "empty file: $File::Find::name\n") + || (-B && print "binary file: $File::Find::name\n")); +} + +finddepth(\&wanted, @ARGV);