commit:     0007bb51630cb4b42a98edb19f174c2b81f70730
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 26 17:25:08 2014 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Fri Sep 26 17:25:08 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=0007bb51

[Documentation/maintainers] Add tool to quickly add new versioned sets.

---
 Documentation/maintainers/set-bump.sh | 49 +++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/Documentation/maintainers/set-bump.sh 
b/Documentation/maintainers/set-bump.sh
new file mode 100755
index 0000000..d5a0fd7
--- /dev/null
+++ b/Documentation/maintainers/set-bump.sh
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+# requires app-portage/portage-utils and app-portage/gentoolkit-dev
+
+: ${PORTDIR:="$(pwd)"}
+
+get_package_list_from_set() {
+
+       local SET="${1}"
+
+       for entry in $(grep -v ^[#@] "${PORTDIR}/sets/${SET}") ; do
+               echo $(qatom ${entry} | cut -d " " -f 1-2 | tr " " "/")
+       done
+
+}
+
+help() {
+       echo Simple tool to bump a KDE set.
+       echo
+       echo Given a set name, copies the live set to the new set version
+       echo and updates the package versions appropriately.
+       echo
+       echo Reads PORTDIR from your enviroment, defaulting to the current 
directory.
+       echo
+       echo Usage: set-bump.sh SETNAME DESTINATIONVERSION
+       echo Example: set-bump.sh kde-plasma 5.1
+       exit 0
+}
+
+
+SETNAME="$1"
+DESTINATIONVERSION="$2"
+
+if [[ $1 == "--help" ]] ; then
+       help
+fi
+
+if [[ -z "${SETNAME}" || -z "${DESTINATIONVERSION}" ]] ; then
+       echo ERROR: Not enough arguments
+       echo
+       help
+fi
+
+pushd "${PORTDIR}/sets" > /dev/null
+
+cp ${SETNAME}-live ${SETNAME}-${DESTINATIONVERSION}
+sed -e "s/~/</" -e "s/9999/${DESTINATIONVERSION}.50:5/" -i 
${SETNAME}-${DESTINATIONVERSION}
+
+popd > /dev/null

Reply via email to