download-release 567 B

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/bash
  2. BASE=$1
  3. BUILD=$2
  4. DIR=$3
  5. set -euo pipefail
  6. if [ -z "$DIR" ]; then
  7. echo run with $0 NAME BUILD_NUMBER DIR
  8. exit 2
  9. fi
  10. mkdir -p $DIR
  11. BASE=https://geodns.bitnames.com/${BASE}/builds/${BUILD}
  12. files=`curl -sSf ${BASE}/checksums.txt | awk '{print $2}'`
  13. metafiles="checksums.txt metadata.json CHANGELOG.md artifacts.json"
  14. for f in $metafiles; do
  15. url=$BASE/$f
  16. echo downloading $url
  17. curl --remove-on-error -sSfRo $DIR/$f $url || true
  18. done
  19. for f in $files; do
  20. url=$BASE/$f
  21. echo downloading $url
  22. curl --remove-on-error -sSfRo $DIR/$f $url
  23. done