summaryrefslogtreecommitdiffstats
path: root/gentoo/Documentation/scripts/update-keywords-lists
blob: 9390cdfb0b93edc580fb0d41920012f8e1e6f976 (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
#!/bin/bash

DOC="Documentation"
KEYWORDS_LIVE="$DOC/trinity.live.keywords"
KEYWORDS_3_5_13_2="$DOC/trinity.3.5.13.2.keywords"

resort() {
	cp "${1}" "${1}.bak"
	cat "${1}.bak" | sort -u >"$1" && rm "${1}.bak"
}

find trinity-base/ trinity-apps/ -iname '*9999.ebuild' | while read eb; do
	PN="$(basename $(dirname ${eb}))"
	C="$(basename $(dirname $(dirname ${eb})))"
	P="$(basename ${eb%%.ebuild})"
	if ! grep "^~$C/$P " "${KEYWORDS_LIVE}" >/dev/null 2>&1; then
		echo "~$C/$P **" | tee -a "${KEYWORDS_LIVE}"
	fi
done

resort "${KEYWORDS_LIVE}"


find trinity-base/ trinity-apps -iname '*3.5.13.2.ebuild' | while read eb; do
	PN="$(basename $(dirname ${eb}))"
	C="$(basename $(dirname $(dirname ${eb})))"
	P="$(basename ${eb%%.ebuild})"
	if ! grep "^~$C/$P" "${KEYWORDS_3_5_13_2}" >/dev/null 2>&1; then
		echo "~$C/$P" | tee -a "${KEYWORDS_3_5_13_2}"
	fi
done
resort "${KEYWORDS_3_5_13_2}"