From ee705e9adf6bde2b8eed7c2b6edae360e595cad2 Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Wed, 25 Nov 2020 10:36:19 +0100 Subject: fetch: check dependencies --- tests/data/Makefile | 2 +- tests/data/fetch.sh | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'tests') 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" -- cgit v1.2.3