summaryrefslogtreecommitdiff
blob: bdc63c892f00a9d9e467aae4fcfb70a66fcd3e28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env

EPREFIX=${EPREFIX:=${HOME}/Gentoo}

ack="${EPREFIX}/etc/portage/package.accept_keywords"

sed "/### START keyword for $1/../### END keyword for $1/d" -i ${ack}

echo "### START keyword for $1" >> ${ack}

while ! emerge -pv $1; do
	emerge -pv $1 | sed -r -n '/masked by: missing keyword/{s,^- (.*/.*)-[[:digit:]].*,\1 **,p;q}' | tee -a ${ack}
done

echo "### END keyword for $1" >> ${ack}