Austin Schuh | c26a290 | 2022-01-14 16:34:25 -0800 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # |
| 3 | # This script makes it easy to rehost dependencies on software.frc971.org so |
| 4 | # we are self hosted everywhere consistently. |
| 5 | |
| 6 | # ./rehost.sh github.com/bazelbuild/rules_nodejs/releases/download/4.4.6/rules_nodejs-4.4.6.tar.gz |
| 7 | |
| 8 | readonly LOCALPATH="$(basename "${1}")" |
| 9 | |
| 10 | set -e |
| 11 | curl -L "https://${1}" -o "${LOCALPATH}" |
| 12 | |
| 13 | echo "https://software.frc971.org/Build-Dependencies/${1}" |
| 14 | |
| 15 | ssh software.frc971.org mkdir -p "$(dirname "/data/files/frc971/Build-Dependencies/${1}")" |
| 16 | rsync --progress -v --ignore-existing "${LOCALPATH}" software.frc971.org:"/data/files/frc971/Build-Dependencies/${1}" |