From 8c4ed2cc6eaff11ba771ac5bd8d671996c7ece68 Mon Sep 17 00:00:00 2001 From: filesite Date: Wed, 26 Jun 2024 19:52:32 +0800 Subject: [PATCH] improve machete docker image download --- install.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 3a90853..1d71ab8 100755 --- a/install.sh +++ b/install.sh @@ -284,8 +284,11 @@ echo "" detectDockerImageExists "filesite/machete" imgExist=$? if [ $imgExist -eq 0 ]; then - echo "下载machete的docker镜像,文件大小89M,预计需要 5 - 10 分钟..." - curl -o machte.tar "https://static.jialuoma.cn/docker_images/machete.tar" + if [ ! -f ./machete.tar ]; then + echo "下载machete的docker镜像,文件大小89M,预计需要 5 - 10 分钟..." + curl -o machte.tar "https://static.jialuoma.cn/docker_images/machete.tar" + fi + if [ -f ./machete.tar ]; then sumok="eacbdfb33873e79d1eccca7fa2d0706a" checkRes=`md5 machete.tar | grep -v grep | grep "${sumok}" | wc -l`