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 1R3sqd-0005rM-LD for garchives@archives.gentoo.org; Wed, 14 Sep 2011 17:02:08 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7135A21C3B3; Wed, 14 Sep 2011 17:01:59 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 3322E21C3B3 for ; Wed, 14 Sep 2011 17:01:59 +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 885C41B404B for ; Wed, 14 Sep 2011 17:01:58 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id E641480042 for ; Wed, 14 Sep 2011 17:01:57 +0000 (UTC) From: "Maxim Koltsov" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Maxim Koltsov" Message-ID: <3543d7efba69ef9ab5a4350b9f5eee14b24b1759.maksbotan@gentoo> Subject: [gentoo-commits] dev/maksbotan:master commit in: Documentation/ X-VCS-Repository: dev/maksbotan X-VCS-Files: Documentation/leech_bump.sh X-VCS-Directories: Documentation/ X-VCS-Committer: maksbotan X-VCS-Committer-Name: Maxim Koltsov X-VCS-Revision: 3543d7efba69ef9ab5a4350b9f5eee14b24b1759 Date: Wed, 14 Sep 2011 17:01:57 +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: 09de415e7d3b3ef61997d3df78964210 commit: 3543d7efba69ef9ab5a4350b9f5eee14b24b1759 Author: Maxim Koltsov gentoo org> AuthorDate: Wed Sep 14 17:02:04 2011 +0000 Commit: Maxim Koltsov gentoo org> CommitDate: Wed Sep 14 17:02:04 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Ddev/maksbotan.git;= a=3Dcommit;h=3D3543d7ef Add script for bumping leechcraft --- Documentation/leech_bump.sh | 88 +++++++++++++++++++++++++++++++++++++= ++++++ 1 files changed, 88 insertions(+), 0 deletions(-) diff --git a/Documentation/leech_bump.sh b/Documentation/leech_bump.sh new file mode 100755 index 0000000..9634812 --- /dev/null +++ b/Documentation/leech_bump.sh @@ -0,0 +1,88 @@ +#!/bin/sh + +. /etc/init.d/functions.sh + +if [[ -z "$1" ]] || [[ -z $2 ]]; then + eerror "Not enough arguments" + einfo "Usage: $0 mode version|message" + einfo "Supported methods are:" + einfo " - bump" + einfo " - commit" + einfo " - repoman" + exit 1 +fi +if [[ "$1" !=3D "bump" ]] && [[ $1 !=3D "commit" ]] && [[ $1 !=3D "repom= an" ]]; then + eerror "Unknown mode $1" + exit 1 +fi + +mode=3D$1 +version=3D$2 + +#checking whether we are in portage tree or overlay +if ! [[ -e ./profiles/repo_name ]]; then + eerror "$(pwd) is not valid Gentoo Repository" + eerror "Please cd to valid Gentoo repository before running $0" + exit 1 +fi + +einfo "Scanning tree for LeechCraft packages" +echo + +for atom in */*; do + CATEGORY=3D${atom%/*} + PN=3D${atom#*/} + if [[ $CATEGORY =3D=3D "eclass" ]]; then + continue + fi + if ! [[ $atom =3D~ leechcraft-* ]]; then + continue + fi + einfo "Going to $atom" + eindent + cd $atom + + if [[ $mode =3D=3D "bump" ]]; then + einfo "Bumping $atom to $version" + + if [[ -e $PN-$version.ebuild ]]; then + ewarn "$atom seems to be already bumped to $version, skippin= g work" + cd - > /dev/null + eoutdent + continue + fi + + ebegin "Copying $PN-9999.ebuild to $PN-$version.ebuild" + cp $PN-{9999,$version}.ebuild + eend $? + =20 + ebegin "Setting keywords on $PN-$version.ebuild" + ekeyword ~amd64 ~x86 $PN-$version.ebuild + eend $? + =20 + ebegin "Running repoman manifest on $atom" + repoman manifest + eend $? + =20 + ebegin "Running cvs add $PN-$version.ebuild" + cvs add $PN-$version.ebuild + eend $? + + ebegin "Generating ChangeLog for $atom" + echangelog "Bump $atom to $version, thanks to 0xd34df00d" + eend $? + elif [[ $mode =3D=3D "commit" ]]; then + einfo "Commiting $atom with message \"$version\"" + =20 + ebegin "Running repoman commit -m \"$version\"" + repoman commit -m "$version" + eend $? + else + einfo "Running repoman in $atom" + repoman fix + fi + + + cd - > /dev/null + eoutdent +done