#!/bin/bash

gzip_image_list_txt="all-gzip-image-list.txt" # 一般不需要修改
oss_prefix_url="https://oss.demo.uavcmlc.com/cmlc-installation"
local_gzip_path="/root/octopus-image"


local_gzip_path="$local_gzip_path/6.1.1"
mkdir -p $local_gzip_path
oss_prefix_url="$oss_prefix_url/6.1.1/"

cd $local_gzip_path || exit

wget "$oss_prefix_url$gzip_image_list_txt"
echo ""
while IFS= read -r i; do
  [ -z "${i}" ] && continue
  echo "download gzip file =>: $oss_prefix_url${i}"
  if wget "$oss_prefix_url${i}" >/dev/null 2>&1; then
    echo "download ok !"
    echo ""
  fi
done <"${gzip_image_list_txt}"