From 411698c16e3b1918c6cf19751e16281d8399f811 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Wed, 25 Apr 2018 10:38:02 +0100 Subject: [PATCH] update-component-sha.sh: simplify the quoting on sed expression I think the intention was to use "" for bits with substititions and '' for bits without, but that makes it hard to read and the bits in '' are safe in the "" context anyway. Running: ./scripts/update-component-sha.sh --image linuxkit/runc 100d0d046c5061d75ee43e4ac5017a759109cae4 Still DTRT and updates runc to that (bogus) sha. Signed-off-by: Ian Campbell --- scripts/update-component-sha.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-component-sha.sh b/scripts/update-component-sha.sh index 704ab0a34..e30bd06e6 100755 --- a/scripts/update-component-sha.sh +++ b/scripts/update-component-sha.sh @@ -69,7 +69,7 @@ case "$1" in hash=$3 ;; esac - git grep -E -l "\b$image:" | xargs sed -i.bak -e "s,$image:[[:xdigit:]]"'\{40\}'",$image:$hash,g" + git grep -E -l "\b$image:" | xargs sed -i.bak -e "s,$image:[[:xdigit:]]\{40\},$image:$hash,g" ;; *) echo "Unknown mode $1"