fix verify-k8s-prefix.sh (#210)

This commit is contained in:
Shiming Zhang
2022-09-06 14:18:03 +08:00
committed by GitHub
parent 1f7c6774fe
commit 998a667b8a
2 changed files with 1 additions and 10 deletions

View File

@@ -2,13 +2,7 @@
file=$1
cp ${file} ${file}.bak
cat ${file} | grep k8s.gcr.io/ | sed 's#k8s.gcr.io/#registry.k8s.io/#' >>${file}.bak
$(dirname "${BASH_SOURCE}")/fmt.sh ${file}.bak
result=$(diff ${file} ${file}.bak)
result="$(cat ${file} | grep k8s.gcr.io/)"
if [[ "${result}" != "" ]]; then
echo "Usually registry.k8s.io/* instead of k8s.gcr.io/*"
@@ -19,5 +13,3 @@ if [[ "${result}" != "" ]]; then
exit 1
fi
rm ${file}.bak