ensure kernel replacement matches middle of line too

Signed-off-by: Avi Deitcher <avi@deitcher.net>
This commit is contained in:
Avi Deitcher
2024-03-04 15:45:23 +02:00
parent 83efa26b65
commit 81f8a91d70
2 changed files with 2 additions and 3 deletions

View File

@@ -69,8 +69,7 @@ case "${mode}" in
fi
old=$1
new=$2
git grep -E -l "\b$old\b" -- '*.yml' '*.yaml' '*.yml.in' '*.yaml.in' '*/Dockerfile' '*/Makefile' | grep -v /vendor/ | while read -r file; do sed -ri.bak -e "s,$old,$new,g" "$file"; done
git grep -E -l "\b($old)([[:space:]].*)?$" -- '*.yml' '*.yaml' '*.yml.in' '*.yaml.in' '*/Dockerfile' '*/Makefile' | grep -v /vendor/ | while read -r file; do sed -ri.bak -e "s,$old,$new,g" "$file"; done
;;
--image)
if [ $# -lt 1 ] ; then