commit: 1f39958e185f4901e2307063047611667be5016b
Author: Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 5 19:38:29 2015 +0000
Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Sun Apr 5 19:38:29 2015 +0000
URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=1f39958e
[Documentation] Add script to create package.* files.
Documentation/maintainers/keywords-bump.sh | 59 ++++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)
diff --git a/Documentation/maintainers/keywords-bump.sh
b/Documentation/maintainers/keywords-bump.sh
new file mode 100755
index 0000000..31fd669
--- /dev/null
+++ b/Documentation/maintainers/keywords-bump.sh
@@ -0,0 +1,59 @@
+#!/bin/sh
+
+: ${PORTDIR:="$(pwd)"}
+
+help() {
+ echo Simple tool to bump KDE package.* files.
+ echo
+ echo Given a set name, copies the live package.* files to the new
+ echo version and updates appropriate.
+ echo
+ echo Reads PORTDIR from your enviroment, defaulting to the current
directory.
+ echo
+ echo Usage: keyword-bump.sh SETNAME DESTINATIONVERSION
+ echo Example: keyword-bump.sh kde-plasma 5.1
+ exit 0
+}
+
+pretty_setname() {
+ local set="${1}"
+ echo ${set} | tr "-" " " | sed -e "s/\b\(.\)/\u\1/g" -e "s/kde/KDE/i"
+}
+
+SETNAME="$1"
+DESTINATIONVERSION="$2"
+TARGET="${SETNAME}-${DESTINATIONVERSION}"
+
+if [[ $1 == "--help" ]] ; then
+ help
+fi
+
+if [[ -z "${SETNAME}" || -z "${DESTINATIONVERSION}" ]] ; then
+ echo ERROR: Not enough arguments
+ echo
+ help
+fi
+
+pushd "${PORTDIR}/Documentation" > /dev/null
+
+pushd package.unmask > /dev/null
+cp -r .${SETNAME}-live .${TARGET}
+pushd .${TARGET} > /dev/null
+rm ${SETNAME}-live
+ln -s ../../../sets/${TARGET} ${TARGET}
+echo "# You can use this file to mask/unmask the $(pretty_setname ${TARGET})
release." > _HEADER_
+echo "# Edit Documentation/package.unmask/.${TARGET}/ files instead." >>
_HEADER_
+popd > /dev/null
+popd > /dev/null
+
+pushd package.accept_keywords > /dev/null
+cp -r .${SETNAME}-live.base .${TARGET}
+pushd .${TARGET} > /dev/null
+rm ${SETNAME}-live
+ln -s ../../../sets/${TARGET} ${TARGET}
+echo "# You can use this file to keyword/unkeyword the $(pretty_setname
${TARGET}) release." > _HEADER_
+echo "# Edit Documentation/package.accept_keywords/.${TARGET}/ files instead."
>> _HEADER_
+popd > /dev/null
+popd > /dev/null
+
+popd > /dev/null