mirror of
https://github.com/DaoCloud/public-image-mirror.git
synced 2025-08-06 20:19:28 +08:00
fix verify-k8s-prefix.sh (#210)
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user