blob: 0e57a9578bf4cd9ca0fa021d9d2a9c9c3302db4a (
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
#!/usr/bin/env bash
: ${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
|