download-release 329 B

1234567891011121314151617181920212223
  1. #!/bin/bash
  2. BUILD=$1
  3. DIR=$2
  4. set -euo pipefail
  5. if [ -z "$DIR" ]; then
  6. echo run with $0 BUILD_NUMBER DIR
  7. exit 2
  8. fi
  9. mkdir -p $DIR
  10. BASE=https://geodns.bitnames.com/builds/$BUILD
  11. files=`curl -sf $BASE/checksums.txt | awk '{print $2}'`
  12. for f in $files; do
  13. url=$BASE/$f
  14. echo downloading $f
  15. curl -sfRo $DIR/$f $url
  16. done