summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenda Xu <heroxbd@gentoo.org>2023-08-16 22:54:00 +0800
committerBenda Xu <heroxbd@gentoo.org>2023-08-16 22:54:00 +0800
commit1f345ae9636511a7c5694584f0f7e753cbb3077d (patch)
treec51039384200bed1a8e2dae29c180e51b0a964f8
parenttest-keyword.sh for aid keywording a dependency tree. (diff)
downloadheroxbd-1f345ae9636511a7c5694584f0f7e753cbb3077d.tar.gz
heroxbd-1f345ae9636511a7c5694584f0f7e753cbb3077d.tar.bz2
heroxbd-1f345ae9636511a7c5694584f0f7e753cbb3077d.zip
test-keyword.sh: test if there is emerge.
Signed-off-by: Benda Xu <heroxbd@gentoo.org>
-rwxr-xr-xtest-keyword.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/test-keyword.sh b/test-keyword.sh
index bdc63c8..86cf65a 100755
--- a/test-keyword.sh
+++ b/test-keyword.sh
@@ -1,7 +1,10 @@
-#!/usr/bin/env
+#!/usr/bin/env bash
EPREFIX=${EPREFIX:=${HOME}/Gentoo}
+echo "See if we have emerge in PATH..."
+type -p emerge || exit 1
+
ack="${EPREFIX}/etc/portage/package.accept_keywords"
sed "/### START keyword for $1/../### END keyword for $1/d" -i ${ack}