This commit is contained in:
anjia0532 2018-06-19 12:29:47 +08:00
parent 5c54de249f
commit 10bdad2f94
1 changed files with 5 additions and 2 deletions

View File

@ -19,12 +19,12 @@ function init_namespace()
n=$1 n=$1
echo -e "${yellow}init gcr.io/$n's image...${plain}" echo -e "${yellow}init gcr.io/$n's image...${plain}"
# get all of the gcr images # get all of the gcr images
imgs=$(curl -ks 'https://console.cloud.google.com/m/gcr/entities/list' \ imgs=$(curl -XPOST -ks 'https://console.cloud.google.com/m/gcr/entities/list' \
-H "Cookie: ${cookie}" \ -H "Cookie: ${cookie}" \
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.7 Safari/537.36' \ -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.7 Safari/537.36' \
-H 'Content-Type: application/json;charset=UTF-8' \ -H 'Content-Type: application/json;charset=UTF-8' \
-H 'Accept: application/json, text/plain, */*' \ -H 'Accept: application/json, text/plain, */*' \
--data-binary '["'${n}'",null,null,[]]' | --data-binary '["'${n}'"]' |
grep -P '"' | grep -P '"' |
sed 's/"gcr.ListEntities"//' | sed 's/"gcr.ListEntities"//' |
cut -d '"' -f2 | cut -d '"' -f2 |
@ -110,6 +110,9 @@ function mirror()
wait ${!} wait ${!}
fi fi
sleep 30
compare
sleep 30
compare compare
tmps=$(find ./gcr.io_mirror/ -type f \( -iname "*.tmp" \) -exec dirname {} \; | uniq | cut -d'/' -f3-4) tmps=$(find ./gcr.io_mirror/ -type f \( -iname "*.tmp" \) -exec dirname {} \; | uniq | cut -d'/' -f3-4)