Files
common/scripts/download-release
Ask Bjørn Hansen 37414e0a4f build(scripts): update release download host and show curl errors
- download-release: switch base URL from geodns.bitnames.com to builds.ntppool.dev
- fury-publish: use curl -Ssf so errors surface even in silent mode
2026-04-13 21:14:54 -07:00

33 lines
582 B
Bash
Executable File

#!/bin/bash
BASE=$1
BUILD=$2
DIR=$3
set -euo pipefail
if [ -z "$DIR" ]; then
echo run with $0 NAME BUILD_NUMBER DIR
exit 2
fi
mkdir -p $DIR
BASE=https://builds.ntppool.dev/${BASE}/builds/${BUILD}
files=`curl -sSf ${BASE}/checksums.txt | sed 's/^[a-f0-9]*[[:space:]]*//'`
metafiles="checksums.txt metadata.json CHANGELOG.md artifacts.json"
for f in $metafiles; do
url=$BASE/$f
echo downloading $url
curl --remove-on-error -sSfRo $DIR/$f $url || true
done
for f in $files; do
url=$BASE/$f
echo downloading $url
curl --remove-on-error -sSfRo $DIR/$f $url
done