From b82b80accaab5a2cc11ed8cfcecd9d69e4b1cb06 Mon Sep 17 00:00:00 2001 From: Benda Xu Date: Wed, 16 Aug 2023 22:45:41 +0800 Subject: test-keyword.sh for aid keywording a dependency tree. Signed-off-by: Benda Xu --- test-keyword.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 test-keyword.sh (limited to 'test-keyword.sh') diff --git a/test-keyword.sh b/test-keyword.sh new file mode 100755 index 0000000..bdc63c8 --- /dev/null +++ b/test-keyword.sh @@ -0,0 +1,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} -- cgit v1.2.3-65-gdbad