summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenda Xu <heroxbd@gentoo.org>2023-08-20 16:52:43 +0800
committerBenda Xu <heroxbd@gentoo.org>2023-08-20 16:53:11 +0800
commit5f3613c2a3de068ab09c41da1146dea28e99b420 (patch)
tree93474569b67f818a593404fe51da80f55ac53419
parenttest-keyword.sh: fix sed line range expression. (diff)
downloadheroxbd-5f3613c2a3de068ab09c41da1146dea28e99b420.tar.gz
heroxbd-5f3613c2a3de068ab09c41da1146dea28e99b420.tar.bz2
heroxbd-5f3613c2a3de068ab09c41da1146dea28e99b420.zip
test-keyword.sh: escape the slashes.HEADmaster
Signed-off-by: Benda Xu <heroxbd@gentoo.org>
-rwxr-xr-xtest-keyword.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/test-keyword.sh b/test-keyword.sh
index 762d174..c87d071 100755
--- a/test-keyword.sh
+++ b/test-keyword.sh
@@ -7,7 +7,8 @@ type -p emerge || exit 1
ack="${EPREFIX}/etc/portage/package.accept_keywords"
-sed "/### START keyword for $1/,/### END keyword for $1/d" -i ${ack}
+escaped_package=${1////\\/}
+sed "/### START keyword for ${escaped_package}/,/### END keyword for ${escaped_package}/d" -i ${ack}
echo "### START keyword for $1" >> ${ack}