public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Maxim Koltsov" <maksbotan@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] dev/maksbotan:master commit in: Documentation/
Date: Wed, 14 Sep 2011 17:01:57 +0000 (UTC)	[thread overview]
Message-ID: <3543d7efba69ef9ab5a4350b9f5eee14b24b1759.maksbotan@gentoo> (raw)

commit:     3543d7efba69ef9ab5a4350b9f5eee14b24b1759
Author:     Maxim Koltsov <maksbotan <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 14 17:02:04 2011 +0000
Commit:     Maxim Koltsov <maksbotan <AT> gentoo <DOT> org>
CommitDate: Wed Sep 14 17:02:04 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=dev/maksbotan.git;a=commit;h=3543d7ef

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" != "bump" ]] && [[ $1 != "commit" ]] && [[ $1 != "repoman" ]]; then
+    eerror "Unknown mode $1"
+    exit 1
+fi
+
+mode=$1
+version=$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=${atom%/*}
+    PN=${atom#*/}
+    if [[ $CATEGORY == "eclass" ]]; then
+        continue
+    fi
+    if ! [[ $atom =~ leechcraft-* ]]; then
+        continue
+    fi
+    einfo "Going to $atom"
+    eindent
+    cd $atom
+
+    if [[ $mode == "bump" ]]; then
+        einfo "Bumping $atom to $version"
+
+        if [[ -e $PN-$version.ebuild ]]; then
+            ewarn "$atom seems to be already bumped to $version, skipping work"
+            cd - > /dev/null
+            eoutdent
+            continue
+        fi
+
+        ebegin "Copying $PN-9999.ebuild to $PN-$version.ebuild"
+        cp $PN-{9999,$version}.ebuild
+        eend $?
+    
+        ebegin "Setting keywords on $PN-$version.ebuild"
+        ekeyword ~amd64 ~x86 $PN-$version.ebuild
+        eend $?
+    
+        ebegin "Running repoman manifest on $atom"
+        repoman manifest
+        eend $?
+    
+        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 == "commit" ]]; then
+        einfo "Commiting $atom with message \"$version\""
+        
+        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



             reply	other threads:[~2011-09-14 17:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-14 17:01 Maxim Koltsov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-09-14 18:16 [gentoo-commits] dev/maksbotan:master commit in: Documentation/ Maxim Koltsov
2011-12-31 12:34 Maxim Koltsov
2011-12-31 12:34 Maxim Koltsov
2012-01-24 17:28 Maxim Koltsov
2012-02-02 17:57 Maxim Koltsov
2012-02-20 19:18 Maxim Koltsov
2012-03-28 13:15 Maxim Koltsov
2012-07-19 19:17 Maxim Koltsov
2012-08-14 20:26 Maxim Koltsov
2013-05-26 19:58 Maxim Koltsov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3543d7efba69ef9ab5a4350b9f5eee14b24b1759.maksbotan@gentoo \
    --to=maksbotan@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox