blob: d88b16e3ba4d69b54b07311dd97cff02e6d1328d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#!/bin/bash
SOURCE=${1:-~/Gentoo/gentoo}
SOURCEVER=${2:-15.08.0}
DEST=${3:-~/Gentoo/kde}
DESTVER=${4:-15.12.0}
CATEGORY=${5:-kde-apps}
TESTING=${6:-yes}
for pd in ${SOURCE}/${CATEGORY}/* ; do
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}/${CATEGORY}/${p}/${p}-${DESTVER}.ebuild" ]; then
echo "processing $p"
sed -i "${DEST}/${CATEGORY}/${p}/${p}-${DESTVER}.ebuild" -e "/^KEYWORDS/cKEYWORDS=\"${kw}\""
if [ ${TESTING} == yes ]; then
ekeyword ~all "${DEST}/${CATEGORY}/${p}/${p}-${DESTVER}.ebuild"
fi
else
echo "error: no file ${DEST}/${CATEGORY}/${p}/${p}-${DESTVER}.ebuild"
fi
fi
done
|