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 1Q4cmc-00055H-4C for garchives@archives.gentoo.org; Tue, 29 Mar 2011 17:32:46 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 250F4E08D2; Tue, 29 Mar 2011 17:32:38 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id E7F1BE08D2 for ; Tue, 29 Mar 2011 17:32:37 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 524A61B40CB for ; Tue, 29 Mar 2011 17:32:36 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 52D5180065 for ; Tue, 29 Mar 2011 17:32:36 +0000 (UTC) From: "Tomas Chvatal" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Tomas Chvatal" Message-ID: Subject: [gentoo-commits] proj/qa-scripts:master commit in: / X-VCS-Repository: proj/qa-scripts X-VCS-Files: check_eclasses_eapis.sh X-VCS-Directories: / X-VCS-Committer: scarabeus X-VCS-Committer-Name: Tomas Chvatal X-VCS-Revision: dfd5f19a16fcb9b7d0f31535f7ddc47ed2b3cce5 Date: Tue, 29 Mar 2011 17:32:36 +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: 1c45b9cc94a9acc995c39e0a2d528e54 commit: dfd5f19a16fcb9b7d0f31535f7ddc47ed2b3cce5 Author: Tomas Chvatal gentoo org> AuthorDate: Tue Mar 29 17:30:14 2011 +0000 Commit: Tomas Chvatal gentoo org> CommitDate: Tue Mar 29 17:30:14 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/qa-scripts.gi= t;a=3Dcommit;h=3Ddfd5f19a Add some sanity checks and allow specification of workdir as argument ot = script. --- check_eclasses_eapis.sh | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/check_eclasses_eapis.sh b/check_eclasses_eapis.sh index ef25d5d..aa77dfa 100755 --- a/check_eclasses_eapis.sh +++ b/check_eclasses_eapis.sh @@ -2,6 +2,10 @@ # Created by Tom=C3=A1=C5=A1 Chv=C3=A1tal # License WTFPL-2.0 =20 +[[ -z ${1} ]] && DIR=3D"${1}" || DIR=3D$(pwd) + +[[ $(type pquery 2> /dev/null) ]] || exit 1 + KNOWN_EAPIS=3D"0 1 2 3 4" TMPEAPIS=3D"/tmp/$(basename $0).global.$$.tmp" TMPECLASS=3D"/tmp/$(basename $0).eclass.$$.tmp" @@ -10,6 +14,7 @@ ECLASSES=3D$(echo *.eclass) popd > /dev/null pquery --attr eapi --attr inherited --raw --all --repo portdir > "${TMPE= APIS}" =20 +pushd ${DIR} > /dev/null rm -rf *.eclass for x in ${ECLASSES}; do echo "Processing eclass \"${x}\"" @@ -25,6 +30,7 @@ for x in ${ECLASSES}; do done popd > /dev/null done +popd > /dev/null =20 rm ${TMPEAPIS} rm ${TMPECLASS}