fix: downloading images on offline machines

pull/1252/head
gjmzj 2023-02-19 09:34:59 +08:00
parent 97933df0d4
commit c8105d465c
1 changed files with 2 additions and 2 deletions

4
ezdown
View File

@ -220,7 +220,7 @@ function get_kubeasz() {
logger debug " run a temporary container"
docker run -d --name temp_easz easzlab/kubeasz:${KUBEASZ_VER} || { logger error "download failed."; exit 1; }
[[ -f "$BASE/down/docker-${DOCKER_VER}.tgz" ]] && /bin/mv -f "$BASE/down/docker-${DOCKER_VER}.tgz" /tmp
[[ -d "$BASE/down" ]] && /bin/mv -f "$BASE/down" /tmp
[[ -d "$BASE/bin" ]] && /bin/mv -f "$BASE/bin" /tmp
rm -rf "$BASE" && \
@ -230,7 +230,7 @@ function get_kubeasz() {
docker rm -f temp_easz
mkdir -p "$BASE/bin" "$BASE/down"
[[ -f "/tmp/docker-${DOCKER_VER}.tgz" ]] && /bin/mv -f "/tmp/docker-${DOCKER_VER}.tgz" "$BASE/down"
[[ -d "/tmp/down" ]] && /bin/mv -f /tmp/down/* "$BASE/down"
[[ -d "/tmp/bin" ]] && /bin/mv -f /tmp/bin/* "$BASE/bin"
return 0
}