message: chore: Also download pact.h along with the ffi, to make maintainer's lives easier
diff: @@ -17,23 +17,33 @@ warn "Cleaning ffi directory $FFI_DIR"
  rm -f "$FFI_DIR"/*
  mkdir -p "$FFI_DIR"
  -function download_ffi {
  +
  +function download_ffi_file {
  if [ -z "${1:-}" ]; then
  - error "${FUNCNAME[0]} requires the environment filename suffix"
  + error "${FUNCNAME[0]} requires the filename to download"
  exit 1
  fi
  - SUFFIX="$1"
  - PREFIX="${2:-}"
  -
  - FFI_FILENAME="${PREFIX}pact_ffi-$SUFFIX"
  + FFI_FILENAME="$1"
  URL="${BASEURL}/libpact_ffi-${FFI_VERSION}/${FFI_FILENAME}"
  DOWNLOAD_LOCATION="$FFI_DIR/${FFI_VERSION}-${FFI_FILENAME}"
  log "Downloading ffi $FFI_VERSION for $SUFFIX"
  download_to "$URL" "$DOWNLOAD_LOCATION"
  + debug_log " ... downloaded to '$DOWNLOAD_LOCATION'"
  +}
  +
  +function download_ffi {
  + if [ -z "${1:-}" ]; then
  + error "${FUNCNAME[0]} requires the environment filename suffix"
  + exit 1
  + fi
  + SUFFIX="$1"
  + PREFIX="${2:-}"
  +
  + download_ffi_file "${PREFIX}pact_ffi-$SUFFIX"
  + debug_log " ... unzipping '$DOWNLOAD_LOCATION'"
  gunzip "$DOWNLOAD_LOCATION"
  - debug_log " ... saved to '$DOWNLOAD_LOCATION'"
  }
  if [ -z "${ONLY_DOWNLOAD_PACT_FOR_WINDOWS:-}" ]; then
  @@ -46,6 +56,8 @@ fi
  download_ffi "windows-x86_64.dll.gz" ""
  +download_ffi_file "pact.h"
  +
  # Write readme in the ffi folder
  cat << EOF > "$FFI_DIR/README.md"
  # FFI binaries
  