build: do not skip downloading relup base package

do not skip downloading only because of curl error
for known missing base packages, we should list them in the script
This commit is contained in:
Zaiming (Stone) Shi 2022-09-14 19:43:00 +02:00
parent 4597344881
commit 2fbb79f84f
1 changed files with 11 additions and 9 deletions

View File

@ -57,7 +57,10 @@ for tag in $(../scripts/relup-base-vsns.sh $EDITION | xargs echo -n); do
filename="$PROFILE-$SYSTEM-${tag#[e|v]}-$ARCH.zip" filename="$PROFILE-$SYSTEM-${tag#[e|v]}-$ARCH.zip"
url="https://packages.emqx.io/$DIR/$tag/$filename" url="https://packages.emqx.io/$DIR/$tag/$filename"
echo "downloading base package from ${url} ..." echo "downloading base package from ${url} ..."
if [ ! -f "$filename" ] && curl -L -I -m 10 -o /dev/null -s -w "%{http_code}" "${url}" | grep -q -oE "^[23]+" ; then if [ -f "$filename" ]; then
echo "file $filename already downloaded; skikpped"
continue
fi
curl -L -o "${filename}" "${url}" curl -L -o "${filename}" "${url}"
if [ "$SYSTEM" != "centos6" ]; then if [ "$SYSTEM" != "centos6" ]; then
curl -L -o "${filename}.sha256" "${url}.sha256" curl -L -o "${filename}.sha256" "${url}.sha256"
@ -66,7 +69,6 @@ for tag in $(../scripts/relup-base-vsns.sh $EDITION | xargs echo -n); do
## https://askubuntu.com/questions/1202208/checking-sha256-checksum ## https://askubuntu.com/questions/1202208/checking-sha256-checksum
echo "${SUMSTR} ${filename}" | $SHASUM -c || exit 1 echo "${SUMSTR} ${filename}" | $SHASUM -c || exit 1
fi fi
fi
done done
popd popd