#!/usr/bin/env bash # Download and vendor libraries into vendor/. # Run from the project root after updating the VERSION variables below. set -euo pipefail # ---- Library versions ---- ACME_VERSION="3.1.3" VENDOR="vendor" download() { local name="$1" url="$2" dest="$3" if [[ -n "${SKIP_DOWNLOAD:-}" ]]; then echo "[skip] $name (SKIP_DOWNLOAD is set)" return fi echo "[download] $name → $dest" curl -sfL -o "$dest" "$url" } download "acme.sh@${ACME_VERSION}" \ "https://raw.githubusercontent.com/acmesh-official/acme.sh/${ACME_VERSION}/acme.sh" \ "${VENDOR}/acme.sh" chmod +x "${VENDOR}/acme.sh" echo "[done] All libraries vendored."