Spaces:
Sleeping
Sleeping
Download fetch from ejschwartz/foxdec: direct link, hf CLI and curl.
- Browser
- Download file 471 Bytes
-
https://huggingface.co/spaces/ejschwartz/foxdec/resolve/main/fetch
- Command line
-
hf download hf://spaces/ejschwartz/foxdec/fetch
-
curl -L -o fetch https://huggingface.co/spaces/ejschwartz/foxdec/resolve/main/fetch
471 Bytes
| set -eu | |
| cached=/downloads/$2 | |
| check() { printf '%s %s\n' "$2" "$1" | sha256sum --check - >/dev/null 2>&1; } | |
| if [ -d /downloads ] && check "$cached" "$2"; then | |
| cp "$cached" "$3" | |
| else | |
| # Zenodo rejects curl's default User-Agent | |
| curl --fail --location --silent --show-error --http1.1 --retry 3 --retry-all-errors \ | |
| -A 'Wget/1.21' "$1" -o "$3" | |
| printf '%s %s\n' "$2" "$3" | sha256sum --check - | |
| ! [ -d /downloads ] || cp "$3" "$cached" | |
| fi | |