diff options
author | Martin Czygan <martin.czygan@gmail.com> | 2020-11-25 10:36:19 +0100 |
---|---|---|
committer | Martin Czygan <martin.czygan@gmail.com> | 2020-11-25 10:36:19 +0100 |
commit | ee705e9adf6bde2b8eed7c2b6edae360e595cad2 (patch) | |
tree | 80d3655d2f121fb80dcbe6831bd598dee67c6e6e | |
parent | c63c6a6ead69c3604b40d3c16ae0937ae7ecf709 (diff) | |
download | fuzzycat-ee705e9adf6bde2b8eed7c2b6edae360e595cad2.tar.gz fuzzycat-ee705e9adf6bde2b8eed7c2b6edae360e595cad2.zip |
fetch: check dependencies
-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" |