aboutsummaryrefslogtreecommitdiffstats
path: root/tests/fixtures/fetch.sh
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2020-11-24 23:51:40 +0100
committerMartin Czygan <martin.czygan@gmail.com>2020-11-24 23:51:40 +0100
commit268e7948e6fa2ee9871430104f60bdab3212464c (patch)
treeb25b96f17767a4f9fdd72e73ccbb5d7b41050314 /tests/fixtures/fetch.sh
parent48d9265ce97e032e4f5fd2aaa3bde7fb8f49d6c5 (diff)
downloadfuzzycat-268e7948e6fa2ee9871430104f60bdab3212464c.tar.gz
fuzzycat-268e7948e6fa2ee9871430104f60bdab3212464c.zip
move towards data subdir
Diffstat (limited to 'tests/fixtures/fetch.sh')
-rwxr-xr-xtests/fixtures/fetch.sh23
1 files changed, 0 insertions, 23 deletions
diff --git a/tests/fixtures/fetch.sh b/tests/fixtures/fetch.sh
deleted file mode 100755
index 8b2ad02..0000000
--- a/tests/fixtures/fetch.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-#
-# Fetches release entity mentioned in verify.csv and cache them locally.
-
-set -e -u
-set -o pipefail
-
-API="https://api.fatcat.wiki/v0"
-CSV="verify.csv"
-
-# Just release ATM, but could extend to other types.
-mkdir -p release
-
-for ident in $(awk -F, '{print $1"\n"$2}' "$CSV"); do
- dst="release/$ident"
- if [ -f "$dst" ]; then
- echo >&2 "[cached] $dst"
- continue
- fi
- tempfile=$(mktemp)
- curl -sL --fail "$API/release/$ident" | jq --sort-keys . >"$tempfile" && mv "$tempfile" "$dst"
- echo >&2 "[fetched] $dst"
-done