aboutsummaryrefslogtreecommitdiff
blob: 8edec81f750f7cf7080a457051d8791c6aa390df (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
60
61
62
63
64
65
66
#!/bin/bash

# Make sure that all systems have the same sort order and date format
export LC_ALL=C

SCRIPT=`basename $0`
if [[ ! -f "${PWD}/${SCRIPT}" ]]; then
	echo "You need to be in '"`dirname $0`"' dir to run this script."
	exit -1
fi

HEADER="# Autogenerated by ${SCRIPT}, DO NOT EDIT."

# regenerate keywords
pushd ../package.keywords/ > /dev/null
for release in 4.7 4.8; do
	echo -e "${HEADER}" > "kde-${release}.keywords"
	if [[ -d ".kde-${release}" ]]; then
		cat ".kde-${release}/"* | sed '/^~.*[.-]9999$/s/$/ **/' >> "kde-${release}.keywords"
	fi
done

# ... and for completely unkeyworded packages, add "**"
if [[ -d .kde-live.base ]]; then
	rm -rf .kde-live
	mkdir -p .kde-live
	echo -e "${HEADER}" > kde-live.keywords
	for file in .kde-live.base/*; do
		newfile=.kde-live/$(basename "${file}")
		sed '/^~.*[.-]9999$/s/$/ **/' "${file}" > "${newfile}"
	done
	cat .kde-live/* >> kde-live.keywords
fi

# keywords for miscleanous packages from package.unmask/
for misc in kde-extras-live koffice-live; do
	if [[ -f "../package.unmask/${misc}" ]]; then
		echo -e "${HEADER}" > "${misc}.keywords"
		sed '/^~.*[.-]9999$/s/$/ **/' "../package.unmask/${misc}" >> "${misc}.keywords"
	fi
done
popd > /dev/null

# regenerate unmask entries (base for package mask)
pushd ../package.unmask/ > /dev/null
for release in 4.7 4.8 live; do
	echo -e "${HEADER}" > "kde-${release}"
	if [[ -d ".kde-${release}" ]]; then
		cat ".kde-${release}/"* >> "kde-${release}"
	fi
done
popd > /dev/null

# regenerate package mask
pushd ../../profiles/ > /dev/null
echo -e "\
${HEADER}
# Edit profiles/package.mask.d/ files instead." > package.mask
if [[ -d package.mask.d ]]; then
	for masks in package.mask.d/*; do
		echo >> package.mask
		cat ${masks} >> package.mask
	done
fi
popd > /dev/null