1 |
commit: 718b494f06e27105cfe787afcce3b69c1adc1e16 |
2 |
Author: Maxim Koltsov <maksbotan <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Dec 31 10:54:28 2011 +0000 |
4 |
Commit: Maxim Koltsov <maksbotan <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Dec 31 10:54:28 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/maksbotan.git;a=commit;h=718b494f |
7 |
|
8 |
Update leechcraft script |
9 |
|
10 |
--- |
11 |
Documentation/leech_bump.sh | 38 ++++++++++++++++++++++++++++++++++++-- |
12 |
1 files changed, 36 insertions(+), 2 deletions(-) |
13 |
|
14 |
diff --git a/Documentation/leech_bump.sh b/Documentation/leech_bump.sh |
15 |
index 9b93253..f54422a 100755 |
16 |
--- a/Documentation/leech_bump.sh |
17 |
+++ b/Documentation/leech_bump.sh |
18 |
@@ -2,6 +2,20 @@ |
19 |
|
20 |
. /etc/init.d/functions.sh |
21 |
|
22 |
+#First argument is changelog arg, second is message arg, third is default message |
23 |
+changelog_helper() { |
24 |
+ if [[ "x${1}" == "x--changelog" ]]; then |
25 |
+ local message |
26 |
+ if [[ ${2} ]]; then |
27 |
+ message="${2}" |
28 |
+ else |
29 |
+ message="${3}" |
30 |
+ fi |
31 |
+ einfo "Running echangelog" |
32 |
+ echangelog ${message} |
33 |
+ fi |
34 |
+} |
35 |
+ |
36 |
if [[ ${#} -lt 2 && ${1} != "repoman" ]]; then |
37 |
eerror "Not enough arguments" |
38 |
einfo "Usage: ${0} mode version|message" |
39 |
@@ -9,11 +23,13 @@ if [[ ${#} -lt 2 && ${1} != "repoman" ]]; then |
40 |
einfo " - bump" |
41 |
einfo " - commit" |
42 |
einfo " - repoman" |
43 |
+ einfo " - delete" |
44 |
+ einfo " - changelog" |
45 |
exit 1 |
46 |
fi |
47 |
|
48 |
case "${1}" in |
49 |
- bump|commit|repoman) ;; |
50 |
+ bump|commit|repoman|delete|eapi|changelog) ;; |
51 |
*) |
52 |
eerror "Unknown mode ${1}" |
53 |
exit 1 |
54 |
@@ -74,7 +90,7 @@ for atom in */*; do |
55 |
eend $? |
56 |
|
57 |
ebegin "Generating ChangeLog for ${atom}" |
58 |
- echangelog "Bump ${atom} to ${version}, thanks to 0xd34df00d" |
59 |
+ changelog_helper --changelog "${4}" "Bump ${atom} to ${version}, thanks to 0xd34df00d" |
60 |
eend $? |
61 |
|
62 |
;; |
63 |
@@ -91,6 +107,24 @@ for atom in */*; do |
64 |
repoman fix |
65 |
|
66 |
;; |
67 |
+ delete) |
68 |
+ einfo "Deleting ${PN}-${version}" |
69 |
+ |
70 |
+ rm ${PN}-${version}.ebuild |
71 |
+ cvs rm ${PN}-${version}.ebuild |
72 |
+ changelog_helper "${3}" "${4}" "Removed old ${PN}-${version}" |
73 |
+ |
74 |
+ ;; |
75 |
+ eapi) |
76 |
+ einfo "Changing EAPI to 4 in ${atom}-${version}" |
77 |
+ |
78 |
+ sed -i 's:EAPI="2":EAPI="4":' ${PN}-${version}.ebuild |
79 |
+ changelog_helper "${3}" "${4}" "Bumped to EAPI=\"4\"" |
80 |
+ |
81 |
+ ;; |
82 |
+ changelog) |
83 |
+ einfo "Running echangelog in ${atom}" |
84 |
+ echangelog ${version} |
85 |
esac |