public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] dev/maksbotan:master commit in: Documentation/
@ 2011-12-31 12:34 Maxim Koltsov
  0 siblings, 0 replies; 11+ messages in thread
From: Maxim Koltsov @ 2011-12-31 12:34 UTC (permalink / raw
  To: gentoo-commits

commit:     718b494f06e27105cfe787afcce3b69c1adc1e16
Author:     Maxim Koltsov <maksbotan <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 31 10:54:28 2011 +0000
Commit:     Maxim Koltsov <maksbotan <AT> gentoo <DOT> org>
CommitDate: Sat Dec 31 10:54:28 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=dev/maksbotan.git;a=commit;h=718b494f

Update leechcraft script

---
 Documentation/leech_bump.sh |   38 ++++++++++++++++++++++++++++++++++++--
 1 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/Documentation/leech_bump.sh b/Documentation/leech_bump.sh
index 9b93253..f54422a 100755
--- a/Documentation/leech_bump.sh
+++ b/Documentation/leech_bump.sh
@@ -2,6 +2,20 @@
 
 . /etc/init.d/functions.sh
 
+#First argument is changelog arg, second is message arg, third is default message
+changelog_helper() {
+    if [[ "x${1}" == "x--changelog" ]]; then
+        local message
+        if [[ ${2} ]]; then
+            message="${2}"
+        else
+            message="${3}"
+        fi
+        einfo "Running echangelog"
+        echangelog ${message}
+    fi
+}
+
 if [[ ${#} -lt 2 && ${1} != "repoman" ]]; then
     eerror "Not enough arguments"
     einfo "Usage: ${0} mode version|message"
@@ -9,11 +23,13 @@ if [[ ${#} -lt 2 && ${1} != "repoman" ]]; then
     einfo " - bump"
     einfo " - commit"
     einfo " - repoman"
+    einfo " - delete"
+    einfo " - changelog"
     exit 1
 fi
 
 case "${1}" in
-    bump|commit|repoman) ;;
+    bump|commit|repoman|delete|eapi|changelog) ;;
     *)
         eerror "Unknown mode ${1}"
         exit 1
@@ -74,7 +90,7 @@ for atom in */*; do
         eend $?
 
         ebegin "Generating ChangeLog for ${atom}"
-        echangelog "Bump ${atom} to ${version}, thanks to 0xd34df00d"
+        changelog_helper --changelog "${4}" "Bump ${atom} to ${version}, thanks to 0xd34df00d"
         eend $?
         
         ;;
@@ -91,6 +107,24 @@ for atom in */*; do
         repoman fix
 
         ;;
+    delete)
+        einfo "Deleting ${PN}-${version}"
+        
+        rm ${PN}-${version}.ebuild
+        cvs rm ${PN}-${version}.ebuild
+        changelog_helper "${3}" "${4}" "Removed old ${PN}-${version}"
+
+        ;;
+    eapi)
+        einfo "Changing EAPI to 4 in ${atom}-${version}"
+
+        sed -i 's:EAPI="2":EAPI="4":' ${PN}-${version}.ebuild
+        changelog_helper "${3}" "${4}" "Bumped to EAPI=\"4\""
+
+        ;;
+    changelog)
+        einfo "Running echangelog in ${atom}"
+        echangelog ${version}
     esac
 
 



^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] dev/maksbotan:master commit in: Documentation/
@ 2013-05-26 19:58 Maxim Koltsov
  0 siblings, 0 replies; 11+ messages in thread
From: Maxim Koltsov @ 2013-05-26 19:58 UTC (permalink / raw
  To: gentoo-commits

commit:     b6c91b66916f0783d20f5851d65f7803cd10c5d1
Author:     Maxim Koltsov <maksbotan <AT> gentoo <DOT> org>
AuthorDate: Sun May 26 19:59:10 2013 +0000
Commit:     Maxim Koltsov <maksbotan <AT> gentoo <DOT> org>
CommitDate: Sun May 26 19:59:10 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=dev/maksbotan.git;a=commit;h=b6c91b66

Make leech_bump.sh support new category

---
 Documentation/leech_bump.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Documentation/leech_bump.sh b/Documentation/leech_bump.sh
index c554d63..d0b5823 100755
--- a/Documentation/leech_bump.sh
+++ b/Documentation/leech_bump.sh
@@ -155,7 +155,7 @@ for atom in */*; do
     if [[ $CATEGORY == "eclass" ]]; then
         continue
     fi
-    if [[ ${PN} != leechcraft-* ]]; then
+    if ! [[ ( ${CATEGORY} == app-leechcraft && ${PN} == lc-* ) || (${PN} == leechcraft-*) ]]; then
         continue
     fi
     if [[ ${mode} != "list" ]]; then


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] dev/maksbotan:master commit in: Documentation/
@ 2012-08-14 20:26 Maxim Koltsov
  0 siblings, 0 replies; 11+ messages in thread
From: Maxim Koltsov @ 2012-08-14 20:26 UTC (permalink / raw
  To: gentoo-commits

commit:     7eb097899dd828864f25e9e116464d5569e5aebd
Author:     Maxim Koltsov <maksbotan <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 19 20:21:36 2012 +0000
Commit:     Maxim Koltsov <maksbotan <AT> gentoo <DOT> org>
CommitDate: Thu Jul 19 20:21:36 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=dev/maksbotan.git;a=commit;h=7eb09789

Make leechcraft script stop on Ctrl-C

---
 Documentation/leech_bump.sh |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/Documentation/leech_bump.sh b/Documentation/leech_bump.sh
index 5895b77..c554d63 100755
--- a/Documentation/leech_bump.sh
+++ b/Documentation/leech_bump.sh
@@ -2,6 +2,8 @@
 
 . /etc/init.d/functions.sh
 
+trap 'exit 1' INT QUIT TERM
+
 #First argument is changelog arg, second is message arg, third is default message
 changelog_helper() {
     if [[ "x${1}" == "x--changelog" ]]; then


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] dev/maksbotan:master commit in: Documentation/
@ 2012-07-19 19:17 Maxim Koltsov
  0 siblings, 0 replies; 11+ messages in thread
From: Maxim Koltsov @ 2012-07-19 19:17 UTC (permalink / raw
  To: gentoo-commits

commit:     c222749135cb79322b9909725d1d332296df77c0
Author:     Maxim Koltsov <maksbotan <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 19 19:17:36 2012 +0000
Commit:     Maxim Koltsov <maksbotan <AT> gentoo <DOT> org>
CommitDate: Thu Jul 19 19:17:36 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=dev/maksbotan.git;a=commit;h=c2227491

Add list mode to leechcraft script, make several comsetic fixes

---
 Documentation/leech_bump.sh |   35 +++++++++++++++++++++++------------
 1 files changed, 23 insertions(+), 12 deletions(-)

diff --git a/Documentation/leech_bump.sh b/Documentation/leech_bump.sh
index 0f6f932..5895b77 100755
--- a/Documentation/leech_bump.sh
+++ b/Documentation/leech_bump.sh
@@ -16,7 +16,7 @@ changelog_helper() {
     fi
 }
 
-if [[ ${#} -lt 2 && ${1} != "repoman" ]]; then
+if [[ ${#} -lt 2 && ${1} != "repoman" && ${1} != "list" ]]; then
     eerror "Not enough arguments"
     einfo "Usage: ${0} mode arguments"
     einfo "Supported modes are:"
@@ -26,6 +26,7 @@ if [[ ${#} -lt 2 && ${1} != "repoman" ]]; then
     einfo " - delete"
     einfo " - changelog"
     einfo " - keyword"
+    einfo " - list"
     einfo "Supported arguments are:"
     einfo " -m --message        Commit message"
     einfo " -c --changelog      Update ChangeLog"
@@ -37,7 +38,7 @@ if [[ ${#} -lt 2 && ${1} != "repoman" ]]; then
 fi
 
 case "${1}" in
-    bump|commit|repoman|delete|changelog|keyword) ;;
+    bump|commit|repoman|delete|changelog|keyword|list) ;;
     *)
         eerror "Unknown mode ${1}"
         exit 1
@@ -59,7 +60,7 @@ while (($#)); do
         -N|--no-changelog)
             run_changelog="0"
             ;;
-       -v|--version)
+        -v|--version)
             version="${2}"
             shift
             ;;
@@ -95,9 +96,9 @@ case $mode in
             run_changelog="1"
         fi
         if [[ -z "${message}" ]]; then
-            message_stub=1
+            message_stub="1"
         fi
-        if [[ -z ${keywords} ]]; then
+        if [[ -z ${keyword} ]]; then
             if [[ ${bump_from}} == 9999 ]]; then
                 keyword="~amd64 ~x86"
             else
@@ -141,8 +142,10 @@ if [[ ! -e ./profiles/repo_name ]]; then
     exit 1
 fi
 
-einfo "Scanning tree for LeechCraft packages"
-echo
+if [[ ${mode} != "list" ]]; then
+    einfo "Scanning tree for LeechCraft packages"
+    echo
+fi
 
 for atom in */*; do
     CATEGORY=${atom%/*}
@@ -153,8 +156,10 @@ for atom in */*; do
     if [[ ${PN} != leechcraft-* ]]; then
         continue
     fi
-    einfo "Going to ${atom}"
-    eindent
+    if [[ ${mode} != "list" ]]; then
+        einfo "Going to ${atom}"
+        eindent
+    fi
     cd ${atom}
 
     case ${mode} in
@@ -234,8 +239,7 @@ for atom in */*; do
         fi
 
         ebegin "Deleting ${PN}-${version}"
-        rm ${PN}-${version}.ebuild
-        cvs rm ${PN}-${version}.ebuild > /dev/null
+        cvs rm -f ${PN}-${version}.ebuild > /dev/null
         eend $?
 
         if [[ ${run_changelog} == "1" ]]; then
@@ -276,9 +280,16 @@ for atom in */*; do
         eend $?
 
         ;;
+    list)
+        if [[ ${version} ]]; then
+            [[ -e ${PN}-${version}.ebuild ]] && echo =${CATEGORY}/${PN}-${version}
+        else
+            echo ${CATEGORY}/${PN}
+        fi
+        ;;
     esac
 
 
     cd - > /dev/null
-    eoutdent
+    [[ ${mode} != "list" ]] && eoutdent
 done



^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] dev/maksbotan:master commit in: Documentation/
@ 2012-03-28 13:15 Maxim Koltsov
  0 siblings, 0 replies; 11+ messages in thread
From: Maxim Koltsov @ 2012-03-28 13:15 UTC (permalink / raw
  To: gentoo-commits

commit:     bda388a7936d0aa2305877fd9e0a4cf56f0ac77d
Author:     Maxim Koltsov <maksbotan <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 28 13:15:04 2012 +0000
Commit:     Maxim Koltsov <maksbotan <AT> gentoo <DOT> org>
CommitDate: Wed Mar 28 13:15:04 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=dev/maksbotan.git;a=commit;h=bda388a7

Change keyword processing, fix argument parsing in leechcraft script

---
 Documentation/leech_bump.sh |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/Documentation/leech_bump.sh b/Documentation/leech_bump.sh
index 3ceb6f1..0f6f932 100755
--- a/Documentation/leech_bump.sh
+++ b/Documentation/leech_bump.sh
@@ -55,11 +55,9 @@ while (($#)); do
             ;;
         -c|--changelog)
             run_changelog="1"
-            shift
             ;;
         -N|--no-changelog)
             run_changelog="0"
-            shift
             ;;
        -v|--version)
             version="${2}"
@@ -99,6 +97,13 @@ case $mode in
         if [[ -z "${message}" ]]; then
             message_stub=1
         fi
+        if [[ -z ${keywords} ]]; then
+            if [[ ${bump_from}} == 9999 ]]; then
+                keyword="~amd64 ~x86"
+            else
+                keyword="~all"
+            fi
+        fi
         ;;
     commit)
         if [[ -z "${message}" ]]; then
@@ -179,8 +184,9 @@ for atom in */*; do
         cp ${PN}-{${bump_from},${version}}.ebuild
         eend $?
     
+
         ebegin "Setting keywords on ${PN}-${version}.ebuild"
-        ekeyword ~all ${PN}-${version}.ebuild > /dev/null
+        ekeyword ${keyword} ${PN}-${version}.ebuild > /dev/null
         eend $?
     
         ebegin "Running repoman manifest on ${atom}"



^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] dev/maksbotan:master commit in: Documentation/
@ 2012-02-20 19:18 Maxim Koltsov
  0 siblings, 0 replies; 11+ messages in thread
From: Maxim Koltsov @ 2012-02-20 19:18 UTC (permalink / raw
  To: gentoo-commits

commit:     bd5b44ab575f6a6f2b8f0066f9345ecac8be9e5b
Author:     Maxim Koltsov <maksbotan <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 20 18:59:08 2012 +0000
Commit:     Maxim Koltsov <maksbotan <AT> gentoo <DOT> org>
CommitDate: Mon Feb 20 18:59:08 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=dev/maksbotan.git;a=commit;h=bd5b44ab

Update LC script

---
 Documentation/leech_bump.sh |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/Documentation/leech_bump.sh b/Documentation/leech_bump.sh
index 8e2fbd1..3ceb6f1 100755
--- a/Documentation/leech_bump.sh
+++ b/Documentation/leech_bump.sh
@@ -216,10 +216,17 @@ for atom in */*; do
 
         ;;
     delete)
-        if [[ -z "${message}" ]]; then
+        if [[ "${message_stub}" == "1" ]]; then
             message="Removed old ${PN}-${version}"
         fi
 
+        if ! [[ -e "${PN}-${version}.ebuild" ]]; then
+            ewarn "${atom} lacks ${version} version, skipping delete"
+            eoutdent
+            cd - > /dev/null
+            continue
+        fi
+
         ebegin "Deleting ${PN}-${version}"
         rm ${PN}-${version}.ebuild
         cvs rm ${PN}-${version}.ebuild > /dev/null



^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] dev/maksbotan:master commit in: Documentation/
@ 2012-02-02 17:57 Maxim Koltsov
  0 siblings, 0 replies; 11+ messages in thread
From: Maxim Koltsov @ 2012-02-02 17:57 UTC (permalink / raw
  To: gentoo-commits

commit:     931d85e62103c36ef5250e319164666827d98fc6
Author:     Maxim Koltsov <maksbotan <AT> gentoo <DOT> org>
AuthorDate: Thu Feb  2 17:58:55 2012 +0000
Commit:     Maxim Koltsov <maksbotan <AT> gentoo <DOT> org>
CommitDate: Thu Feb  2 17:58:55 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=dev/maksbotan.git;a=commit;h=931d85e6

Fix bug in leech script

---
 Documentation/leech_bump.sh |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/Documentation/leech_bump.sh b/Documentation/leech_bump.sh
index 876cf8c..8e2fbd1 100755
--- a/Documentation/leech_bump.sh
+++ b/Documentation/leech_bump.sh
@@ -96,6 +96,9 @@ case $mode in
         if [[ ${run_changelog} != "0" ]]; then
             run_changelog="1"
         fi
+        if [[ -z "${message}" ]]; then
+            message_stub=1
+        fi
         ;;
     commit)
         if [[ -z "${message}" ]]; then
@@ -151,8 +154,9 @@ for atom in */*; do
 
     case ${mode} in
     bump)
-        if [[ -z "${message}" ]]; then
+        if [[ "${message_stub}" == "1" ]]; then
             message="Bump ${atom} to ${version}, thanks to 0xd34df00d"
+
         fi
 
         einfo "Bumping ${atom} to ${version}"
@@ -192,6 +196,7 @@ for atom in */*; do
             echangelog ${message} > /dev/null
             eend $?
         fi
+
         ;;
     commit)
         einfo "Commiting ${atom} with message \"${message}\""



^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] dev/maksbotan:master commit in: Documentation/
@ 2012-01-24 17:28 Maxim Koltsov
  0 siblings, 0 replies; 11+ messages in thread
From: Maxim Koltsov @ 2012-01-24 17:28 UTC (permalink / raw
  To: gentoo-commits

commit:     8abf8c336b000422498a5d1d59ede6bf7a455396
Author:     Maxim Koltsov <maksbotan <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 24 17:29:21 2012 +0000
Commit:     Maxim Koltsov <maksbotan <AT> gentoo <DOT> org>
CommitDate: Tue Jan 24 17:29:21 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=dev/maksbotan.git;a=commit;h=8abf8c33

Update lc bump script

---
 Documentation/leech_bump.sh |   41 ++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 40 insertions(+), 1 deletions(-)

diff --git a/Documentation/leech_bump.sh b/Documentation/leech_bump.sh
index abc6fd8..876cf8c 100755
--- a/Documentation/leech_bump.sh
+++ b/Documentation/leech_bump.sh
@@ -25,17 +25,19 @@ if [[ ${#} -lt 2 && ${1} != "repoman" ]]; then
     einfo " - repoman"
     einfo " - delete"
     einfo " - changelog"
+    einfo " - keyword"
     einfo "Supported arguments are:"
     einfo " -m --message        Commit message"
     einfo " -c --changelog      Update ChangeLog"
     einfo " -N --no-changelog   Do not update ChangeLog"
     einfo " -v --version        Target version for bump"
     einfo " -f --bump-from      Source version for bump"
+    einfo " -k --keyword        Keywords to set"
     exit 1
 fi
 
 case "${1}" in
-    bump|commit|repoman|delete|changelog) ;;
+    bump|commit|repoman|delete|changelog|keyword) ;;
     *)
         eerror "Unknown mode ${1}"
         exit 1
@@ -67,6 +69,10 @@ while (($#)); do
             bump_from="${2}"
             shift
             ;;
+        -k|--keyword)
+            keyword="${2}"
+            shift
+            ;;
         -*)
             eerror "Unknown option $1"
             ;;
@@ -112,6 +118,12 @@ case $mode in
             exit
         fi
         ;;
+    keyword)
+        if [[ -z ${keyword} || -z ${version} ]]; then
+            eerror "You must specify --keyword and --version arguments"
+            exit
+        fi
+        ;;
 esac
 
 #checking whether we are in portage tree or overlay
@@ -214,11 +226,38 @@ for atom in */*; do
             eend $?
         fi
 
+        ebegin "Running repoman manifest on ${atom}"
+        repoman manifest > /dev/null
+        eend $?
+
         ;;
     changelog)
         ebegin "Running echangelog in ${atom}"
         echangelog ${message} > /dev/null
         eend $?
+
+        ebegin "Running repoman manifest on ${atom}"
+        repoman manifest > /dev/null
+        eend $?
+
+        ;;
+    keyword)
+        if [[ ! -e ${PN}-${version}.ebuild ]]; then
+            ewarn "${PN} doesn't have ${version} version, skipping"
+            eoutdent
+            cd - > /dev/null
+            continue
+        fi
+
+        ebegin "Running ekeyword in ${atom}"
+        ekeyword ${keyword} ${PN}-${version}.ebuild > /dev/null
+        eend $?
+
+        ebegin "Running repoman manifest on ${atom}"
+        repoman manifest > /dev/null
+        eend $?
+
+        ;;
     esac
 
 



^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] dev/maksbotan:master commit in: Documentation/
@ 2011-12-31 12:34 Maxim Koltsov
  0 siblings, 0 replies; 11+ messages in thread
From: Maxim Koltsov @ 2011-12-31 12:34 UTC (permalink / raw
  To: gentoo-commits

commit:     e19e6fcba7e6bba90b07a06f66bbf2c30a08008d
Author:     Maxim Koltsov <maksbotan <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 31 12:34:43 2011 +0000
Commit:     Maxim Koltsov <maksbotan <AT> gentoo <DOT> org>
CommitDate: Sat Dec 31 12:34:43 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=dev/maksbotan.git;a=commit;h=e19e6fcb

Implement nice arguments in leech_bump.sh

---
 Documentation/leech_bump.sh |  152 ++++++++++++++++++++++++++++++++++--------
 1 files changed, 123 insertions(+), 29 deletions(-)

diff --git a/Documentation/leech_bump.sh b/Documentation/leech_bump.sh
index f54422a..abc6fd8 100755
--- a/Documentation/leech_bump.sh
+++ b/Documentation/leech_bump.sh
@@ -18,26 +18,101 @@ changelog_helper() {
 
 if [[ ${#} -lt 2 && ${1} != "repoman" ]]; then
     eerror "Not enough arguments"
-    einfo "Usage: ${0} mode version|message"
+    einfo "Usage: ${0} mode arguments"
     einfo "Supported modes are:"
     einfo " - bump"
     einfo " - commit"
     einfo " - repoman"
     einfo " - delete"
     einfo " - changelog"
+    einfo "Supported arguments are:"
+    einfo " -m --message        Commit message"
+    einfo " -c --changelog      Update ChangeLog"
+    einfo " -N --no-changelog   Do not update ChangeLog"
+    einfo " -v --version        Target version for bump"
+    einfo " -f --bump-from      Source version for bump"
     exit 1
 fi
 
 case "${1}" in
-    bump|commit|repoman|delete|eapi|changelog) ;;
+    bump|commit|repoman|delete|changelog) ;;
     *)
         eerror "Unknown mode ${1}"
         exit 1
         ;;
 esac
 
-mode=${1}
-version=${2}
+mode="${1}"
+shift
+
+while (($#)); do
+    case "$1" in
+        -m|--message)
+            message="${2}"
+            shift
+            ;;
+        -c|--changelog)
+            run_changelog="1"
+            shift
+            ;;
+        -N|--no-changelog)
+            run_changelog="0"
+            shift
+            ;;
+       -v|--version)
+            version="${2}"
+            shift
+            ;;
+        -f|--bump-from)
+            bump_from="${2}"
+            shift
+            ;;
+        -*)
+            eerror "Unknown option $1"
+            ;;
+        *)
+            break
+            ;;
+    esac
+    shift
+done
+
+case $mode in
+    bump)
+        if [[ -z "${version}" ]]; then
+            eerror "Please specify target bump version"
+            exit
+        fi
+
+        if [[ -z "${bump_from}" ]]; then
+            bump_from=9999
+        fi
+        if [[ ${run_changelog} != "0" ]]; then
+            run_changelog="1"
+        fi
+        ;;
+    commit)
+        if [[ -z "${message}" ]]; then
+            eerror "Please specify commit message"
+            exit
+        fi
+        ;;
+    delete)
+        if [[ -z "${version}" ]]; then
+            eerror "Please specify version to remove"
+            exit
+        fi
+        if [[ ${run_changelog} != "0" ]]; then
+           run_changelog="1"
+        fi
+        ;;
+    changelog)
+        if [[ -z ${message} ]]; then
+            eerror "Please specify ChangeLog message"
+            exit
+        fi
+        ;;
+esac
 
 #checking whether we are in portage tree or overlay
 if [[ ! -e ./profiles/repo_name ]]; then
@@ -64,6 +139,10 @@ for atom in */*; do
 
     case ${mode} in
     bump)
+        if [[ -z "${message}" ]]; then
+            message="Bump ${atom} to ${version}, thanks to 0xd34df00d"
+        fi
+
         einfo "Bumping ${atom} to ${version}"
 
         if [[ -e ${PN}-${version}.ebuild ]]; then
@@ -73,33 +152,45 @@ for atom in */*; do
             continue
         fi
 
-        ebegin "Copying ${PN}-9999.ebuild to ${PN}-${version}.ebuild"
-        cp ${PN}-{9999,${version}}.ebuild
+        if ! [[ -e "${PN}-${bump_from}.ebuild" ]]; then
+            ewarn "${atom} lacks ${bump_from} version, skipping bump"
+            cd - > /dev/null
+            eoutdent
+            continue
+        fi
+
+        ebegin "Copying ${PN}-${bump_from}.ebuild to ${PN}-${version}.ebuild"
+        cp ${PN}-{${bump_from},${version}}.ebuild
         eend $?
     
         ebegin "Setting keywords on ${PN}-${version}.ebuild"
-        ekeyword ~amd64 ~x86 ${PN}-${version}.ebuild
+        ekeyword ~all ${PN}-${version}.ebuild > /dev/null
         eend $?
     
         ebegin "Running repoman manifest on ${atom}"
-        repoman manifest
+        repoman manifest > /dev/null
         eend $?
     
         ebegin "Running cvs add ${PN}-${version}.ebuild"
-        cvs add ${PN}-${version}.ebuild
+        cvs add ${PN}-${version}.ebuild > /dev/null
         eend $?
 
-        ebegin "Generating ChangeLog for ${atom}"
-        changelog_helper --changelog "${4}" "Bump ${atom} to ${version}, thanks to 0xd34df00d"
-        eend $?
-        
+        if [[ ${run_changelog} == "1" ]]; then
+            ebegin "Generating ChangeLog for ${atom}"
+            echangelog ${message} > /dev/null
+            eend $?
+        fi
         ;;
     commit)
-        einfo "Commiting ${atom} with message \"${version}\""
+        einfo "Commiting ${atom} with message \"${message}\""
 
-        ebegin "Running repoman commit -m \"${version}\""
-        repoman commit -m "${version}"
-        eend $?
+        ebegin "Running repoman commit -m \"${message}\""
+        if [[ ${run_changelog} == "0" ]]; then
+            changelog_arg="--echangelog=n"
+        else
+            changelog_arg=""
+        fi
+        repoman commit ${changelog_arg} -m "${message}"
 
         ;;
     repoman)
@@ -108,23 +199,26 @@ for atom in */*; do
 
         ;;
     delete)
-        einfo "Deleting ${PN}-${version}"
-        
-        rm ${PN}-${version}.ebuild
-        cvs rm ${PN}-${version}.ebuild
-        changelog_helper "${3}" "${4}" "Removed old ${PN}-${version}"
+        if [[ -z "${message}" ]]; then
+            message="Removed old ${PN}-${version}"
+        fi
 
-        ;;
-    eapi)
-        einfo "Changing EAPI to 4 in ${atom}-${version}"
+        ebegin "Deleting ${PN}-${version}"
+        rm ${PN}-${version}.ebuild
+        cvs rm ${PN}-${version}.ebuild > /dev/null
+        eend $?
 
-        sed -i 's:EAPI="2":EAPI="4":' ${PN}-${version}.ebuild
-        changelog_helper "${3}" "${4}" "Bumped to EAPI=\"4\""
+        if [[ ${run_changelog} == "1" ]]; then
+            ebegin "Generating changelog in ${atom}"
+            echangelog ${message} > /dev/null
+            eend $?
+        fi
 
         ;;
     changelog)
-        einfo "Running echangelog in ${atom}"
-        echangelog ${version}
+        ebegin "Running echangelog in ${atom}"
+        echangelog ${message} > /dev/null
+        eend $?
     esac
 
 



^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] dev/maksbotan:master commit in: Documentation/
@ 2011-09-14 18:16 Maxim Koltsov
  0 siblings, 0 replies; 11+ messages in thread
From: Maxim Koltsov @ 2011-09-14 18:16 UTC (permalink / raw
  To: gentoo-commits

commit:     8a237dcd19a18cb052730d59ba320eb9f8bc16a5
Author:     Maxim Koltsov <maksbotan <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 14 17:07:50 2011 +0000
Commit:     Maxim Koltsov <maksbotan <AT> gentoo <DOT> org>
CommitDate: Wed Sep 14 18:13:00 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=dev/maksbotan.git;a=commit;h=8a237dcd

Fixes inspired by mgorny's advices

---
 Documentation/leech_bump.sh |   79 ++++++++++++++++++++++++------------------
 1 files changed, 45 insertions(+), 34 deletions(-)

diff --git a/Documentation/leech_bump.sh b/Documentation/leech_bump.sh
index 9634812..9b93253 100755
--- a/Documentation/leech_bump.sh
+++ b/Documentation/leech_bump.sh
@@ -1,26 +1,30 @@
-#!/bin/sh
+#!/bin/bash
 
 . /etc/init.d/functions.sh
 
-if [[ -z "$1" ]] || [[ -z $2 ]]; then
+if [[ ${#} -lt 2 && ${1} != "repoman" ]]; then
     eerror "Not enough arguments"
-    einfo "Usage: $0 mode version|message"
-    einfo "Supported methods are:"
+    einfo "Usage: ${0} mode version|message"
+    einfo "Supported modes 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
+case "${1}" in
+    bump|commit|repoman) ;;
+    *)
+        eerror "Unknown mode ${1}"
+        exit 1
+        ;;
+esac
+
+mode=${1}
+version=${2}
 
 #checking whether we are in portage tree or overlay
-if ! [[ -e ./profiles/repo_name ]]; then
+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
@@ -35,52 +39,59 @@ for atom in */*; do
     if [[ $CATEGORY == "eclass" ]]; then
         continue
     fi
-    if ! [[ $atom =~ leechcraft-* ]]; then
+    if [[ ${PN} != leechcraft-* ]]; then
         continue
     fi
-    einfo "Going to $atom"
+    einfo "Going to ${atom}"
     eindent
-    cd $atom
+    cd ${atom}
 
-    if [[ $mode == "bump" ]]; then
-        einfo "Bumping $atom to $version"
+    case ${mode} in
+    bump)
+        einfo "Bumping ${atom} to ${version}"
 
-        if [[ -e $PN-$version.ebuild ]]; then
-            ewarn "$atom seems to be already bumped to $version, skipping work"
+        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
+        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
+        ebegin "Setting keywords on ${PN}-${version}.ebuild"
+        ekeyword ~amd64 ~x86 ${PN}-${version}.ebuild
         eend $?
     
-        ebegin "Running repoman manifest on $atom"
+        ebegin "Running repoman manifest on ${atom}"
         repoman manifest
         eend $?
     
-        ebegin "Running cvs add $PN-$version.ebuild"
-        cvs add $PN-$version.ebuild
+        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"
+        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"
+        ;;
+    commit)
+        einfo "Commiting ${atom} with message \"${version}\""
+
+        ebegin "Running repoman commit -m \"${version}\""
+        repoman commit -m "${version}"
         eend $?
-    else
-        einfo "Running repoman in $atom"
+
+        ;;
+    repoman)
+        einfo "Running repoman in ${atom}"
         repoman fix
-    fi
+
+        ;;
+    esac
 
 
     cd - > /dev/null



^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] dev/maksbotan:master commit in: Documentation/
@ 2011-09-14 17:01 Maxim Koltsov
  0 siblings, 0 replies; 11+ messages in thread
From: Maxim Koltsov @ 2011-09-14 17:01 UTC (permalink / raw
  To: gentoo-commits

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



^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-05-26 19:58 UTC | newest]

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox