diff options
author | Andreas K. Huettel (dilfridge) <dilfridge@gentoo.org> | 2014-01-18 00:04:20 +0100 |
---|---|---|
committer | Andreas K. Huettel (dilfridge) <dilfridge@gentoo.org> | 2014-01-18 00:04:20 +0100 |
commit | ddc25d3c35c2b37f29333800db76446756c9e1a7 (patch) | |
tree | 211ea8c8467a58ccc6e5bffe33af1a27dbc463c8 /Documentation/maintainers/copy-keywords | |
parent | [kde-frameworks] doxygen is now enabled by default. (diff) | |
download | kde-ddc25d3c35c2b37f29333800db76446756c9e1a7.tar.gz kde-ddc25d3c35c2b37f29333800db76446756c9e1a7.tar.bz2 kde-ddc25d3c35c2b37f29333800db76446756c9e1a7.zip |
[maint] experimental bash script to copy keywords
Diffstat (limited to 'Documentation/maintainers/copy-keywords')
-rwxr-xr-x | Documentation/maintainers/copy-keywords | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/Documentation/maintainers/copy-keywords b/Documentation/maintainers/copy-keywords new file mode 100755 index 0000000000..c75ae41cee --- /dev/null +++ b/Documentation/maintainers/copy-keywords @@ -0,0 +1,48 @@ +#!/bin/bash + +SOURCE=${1:-~/Gentoo/gentoo-x86} +SOURCEVER=${2:-4.11.2} + +DEST=${3:-~/Gentoo/kde} +DESTVER=${4:-4.12.1} + +TESTING=${5:-yes} + +for pd in ${SOURCE}/kde-base/* ; do + + if [ "`basename ${pd}`x" == 'CVSx' ]; then + + true + + else + + p="`basename $pd`" + kw=`cat ${pd}/${p}-${SOURCEVER}*ebuild | grep "^KEYWORDS" | head -n 1 | sed -e 's:^KEYWORDS="::' -e 's:".*$::'` + + if [ "${kw}x" == x ]; then + + echo "error: $p ebuild not found" + + else + + if [ -f "${DEST}/kde-base/${p}/${p}-${DESTVER}.ebuild" ]; then + + echo "processing $p" + + sed -i "${DEST}/kde-base/${p}/${p}-${DESTVER}.ebuild" -e "/^KEYWORDS/cKEYWORDS=\"${kw}\"" + + if [ ${TESTING} == yes ]; then + ekeyword ~all "${DEST}/kde-base/${p}/${p}-${DESTVER}.ebuild" + fi + + else + + echo "error: no file ${DEST}/kde-base/${p}/${p}-${DESTVER}.ebuild" + + fi + + fi + + fi + +done |