aboutsummaryrefslogtreecommitdiffstats
path: root/tests/data
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2020-11-25 10:36:19 +0100
committerMartin Czygan <martin.czygan@gmail.com>2020-11-25 10:36:19 +0100
commitee705e9adf6bde2b8eed7c2b6edae360e595cad2 (patch)
tree80d3655d2f121fb80dcbe6831bd598dee67c6e6e /tests/data
parentc63c6a6ead69c3604b40d3c16ae0937ae7ecf709 (diff)
downloadfuzzycat-ee705e9adf6bde2b8eed7c2b6edae360e595cad2.tar.gz
fuzzycat-ee705e9adf6bde2b8eed7c2b6edae360e595cad2.zip
fetch: check dependencies
Diffstat (limited to 'tests/data')
-rw-r--r--tests/data/Makefile2
-rwxr-xr-xtests/data/fetch.sh10
2 files changed, 10 insertions, 2 deletions
diff --git a/tests/data/Makefile b/tests/data/Makefile
index fa09b54..784c620 100644
--- a/tests/data/Makefile
+++ b/tests/data/Makefile
@@ -2,5 +2,5 @@ SHELL := /bin/bash
.PHONY: fetch
fetch: fetch.sh
- bash fetch.sh
+ @bash fetch.sh
diff --git a/tests/data/fetch.sh b/tests/data/fetch.sh
index bf6832c..9254cdc 100755
--- a/tests/data/fetch.sh
+++ b/tests/data/fetch.sh
@@ -7,9 +7,17 @@ set -o pipefail
API="https://api.fatcat.wiki/v0"
CSV="verify.csv"
+RELEASE_DIR="release"
+
+for prog in curl jq; do
+ command -v $prog >/dev/null 2>&1 || {
+ echo >&2 "$prog required"
+ exit 1
+ }
+done
# Just release ATM, but could extend to other types.
-mkdir -p release
+mkdir -p "$RELEASE_DIR"
for ident in $(awk -F, '{print $1"\n"$2}' "$CSV"); do
dst="release/$ident"