This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
tsg-tsg-performance-test-tools/tsg-rpm-script/download_last_TSG-OS.sh
2021-07-16 20:01:46 +08:00

17 lines
577 B
Bash

#!/bin/bash
BASE_URL="https://repo.geedge.net/pulp/content/install/rc/tsg-os-images/"
#BASE_URL="https://repo.geedge.net/pulp/content/install/testing/tsg-os-images/"
OS_TYPE="NPB"
URI_ARRAY=`curl --user luwenpeng:LWP@repo ${BASE_URL} | grep href | awk -F = '{print $2}' | awk -F '"' '{print $2}' | sort -n | grep ${OS_TYPE} | tail -n 1`
echo "======================================"
echo "Last TSG-OS: ${URI_ARRAY}"
echo "======================================"
for uri in ${URI_ARRAY[@]}
do
wget --http-user=luwenpeng --http-password=LWP@repo -c ${BASE_URL}${uri} &
done