hurl/integration/test_curl_commands.sh
2022-02-05 18:15:41 +01:00

15 lines
349 B
Bash
Executable File

#!/bin/bash
set -eu
for f in "$@"; do
echo "** $f"
grep -v '^$' <"$f" | grep -v '^#' | while read -r line; do
echo "$line"
cmd="$line --no-progress-meter --output /dev/null --fail"
echo "$cmd" | bash || (echo ">>> Error <<<<" && exit 1)
done
echo
done
echo "all curl commands have been run with success!"