#!/usr/bin/env bash # # Script for querying the API. # # Shellcheck can't search dynamic paths # shellcheck source=/dev/null set -euo pipefail file="" # File name of the all-features API text file. crate_full_name="" # Full crate name using underscores e.g., `bitcoin_primitives`. crate="" # Short name e.g., `primitives`. # Set to false to turn off verbose output. flag_verbose=false usage() { cat <&2 } verbose_say() { if [ "$flag_verbose" = true ]; then say "$1" fi } err() { echo "$1" >&2 exit 1 } need_cmd() { if ! command -v "$1" > /dev/null 2>&1 then err "need '$1' (command not found)" fi } # # Main script # main "$@" exit 0