diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/data/Makefile | 2 | ||||
-rwxr-xr-x | tests/data/fetch.sh | 10 |
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" |